-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathlang_angularjs.py
More file actions
49 lines (32 loc) · 1.12 KB
/
lang_angularjs.py
File metadata and controls
49 lines (32 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python
# Copyright (c) 2010 ActiveState Software Inc.
# See LICENSE.txt for license details.
"""AngularJS support for CodeIntel"""
from __future__ import absolute_import
import logging
from codeintel2.common import _xpcom_
from codeintel2.lang_html5 import HTML5Lexer, HTML5LangIntel, HTML5Buffer, HTML5CILEDriver
if _xpcom_:
from xpcom.server import UnwrapObject
#---- globals
lang = "AngularJS"
log = logging.getLogger("codeintel.angularjs")
#log.setLevel(logging.DEBUG)
#---- language support
class AngularJSLexer(HTML5Lexer):
lang = "AngularJS"
class AngularJSLangIntel(HTML5LangIntel):
lang = lang
class AngularJSBuffer(HTML5Buffer):
lang = lang
class AngularJSCILEDriver(HTML5CILEDriver):
lang = lang
#---- registration
def register(mgr):
"""Register language support with the Manager."""
mgr.set_lang_info(lang,
silvercity_lexer=AngularJSLexer(),
buf_class=AngularJSBuffer,
langintel_class=AngularJSLangIntel,
cile_driver_class=AngularJSCILEDriver,
is_cpln_lang=True)