from codeintel2.util import makePerformantLogger
from codeintel2.lang_javascript import (
    JavaScriptLexer,
    JavaScriptLangIntel,
    JavaScriptBuffer,
    JavaScriptImportHandler,
    JavaScriptCILEDriver,
)
from codeintel2.tree_javascript import JavaScriptTreeEvaluator

# ---- globals

lang = "Node.js"
log = logging.getLogger("codeintel.nodejs")
# log.setLevel(logging.DEBUG)
makePerformantLogger(log)


# ---- language support


class NodeJSTreeEvaluator(JavaScriptTreeEvaluator):
    @property
    def nodejslib(self):
        if not hasattr(self, "_nodejslib"):
            libdir = os.path.join(os.path.dirname(__file__), "lib_srcs", "node.js")
            for lib in self.libs:
                if libdir in getattr(lib, "dirs", []):
                    self._nodejslib = lib
                    break
            else:
Beispiel #2
0
                                  ProgLangTriggerIntelMixin,
                                  PythonCITDLExtractorMixin)

from codeintel2.tree import tree_from_cix

if _xpcom_:
    from xpcom.server import UnwrapObject

#---- globals

_SCAN_BINARY_FILES = False

lang = "Python"
log = logging.getLogger("codeintel.python")
#log.setLevel(logging.DEBUG)
makePerformantLogger(log)

CACHING = True  #DEPRECATED: kill it

# See http://effbot.org/zone/pythondoc.htm
_g_pythondoc_tags = list(
    sorted("param keyparam return exception def "
           "defreturn see link linkplain".split()))

_g_python_magic_method_names = sorted([
    '__init__',
    '__new__',
    '__del__',
    '__repr__',
    '__str__',
    '__lt__',