Skip to content

Commit 50df9c4

Browse files
committed
CodeIntel2 updated
1 parent 6340087 commit 50df9c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+65259
-542
lines changed

libs/codeintel2/accessor.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,16 @@ def char_at_pos(self, pos):
168168
def _token_at_pos(self, pos):
169169
#XXX Locality of reference should offer an optimization here.
170170
# Binary search for appropriate token.
171-
lower, upper = 0, len(self.tokens) - 1 # [lower-limit, upper-limit)
171+
lower, upper = 0, len(self.tokens) # [lower-limit, upper-limit)
172172
sentinel = 15
173173
while sentinel > 0:
174174
idx = ((upper - lower) / 2) + lower
175175
token = self.tokens[idx]
176-
# print "_token_at_pos %d: token idx=%d text[%d:%d]=%r"\
176+
#print "_token_at_pos %d: token idx=%d text[%d:%d]=%r"\
177177
# % (pos, idx, token["start_index"], token["end_index"],
178178
# token["text"])
179-
# start, end = token["start_index"], token["end_index"]
180-
if lower == upper:
181-
return token
182-
elif pos < token["start_index"]:
179+
start, end = token["start_index"], token["end_index"]
180+
if pos < token["start_index"]:
183181
upper = idx
184182
elif pos > token["end_index"]:
185183
lower = idx + 1

libs/codeintel2/catalogs/jquery.cix

Lines changed: 202 additions & 153 deletions
Large diffs are not rendered by default.

libs/codeintel2/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ class Trigger(object):
265265
# Foo::Bar-><|> # trigger token is '->', length = 2
266266
# This default to 1.
267267
length = None
268+
retriggerOnCompletion = False
268269

269270
def __init__(self, lang, form, type, pos, implicit, length=1,
270271
**extra):

libs/codeintel2/constants_css1.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
import textwrap
66

7-
from codeintel2.util import CompareNPunctLast
8-
97
CSS_PSEUDO_CLASS_NAMES = """first-letter first-line link active visited
108
first-child focus hover lang before after left right first""".split()
119

libs/codeintel2/constants_css2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import textwrap
66

7-
from codeintel2.util import CompareNPunctLast
87
from codeintel2.constants_css1 import CSS_ATTR_DICT as CSS1_ATTR_DICT
98
from codeintel2.constants_css1 import CSS_PROPERTY_ATTRIBUTE_CALLTIPS_DICT as CSS1_PROPERTY_ATTRIBUTE_CALLTIPS_DICT
109

@@ -581,6 +580,7 @@
581580
}
582581

583582
# Add the css2 system colors.
583+
#from codeintel2.util import CompareNPunctLast
584584
#for attr, values in CSS_ATTR_DICT.items():
585585
# if '#' in values or 'rbg(' in values:
586586
# CSS_ATTR_DICT[attr] = sorted(values + css2_system_colors.keys(),

libs/codeintel2/constants_css3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import textwrap
66

7-
from codeintel2.util import CompareNPunctLast
87
from codeintel2.constants_css1 import CSS_ATTR_DICT as CSS1_SPECIFIC_ATTRS_DICT
98
from codeintel2.constants_css1 import CSS_PROPERTY_ATTRIBUTE_CALLTIPS_DICT as CSS1_SPECIFIC_CALLTIP_DICT
109
from codeintel2.constants_css2 import CSS2_SPECIFIC_ATTRS_DICT, CSS2_SPECIFIC_CALLTIP_DICT
@@ -874,7 +873,7 @@
874873
if attr_completions:
875874
CSS3_SPECIFIC_ATTRS_DICT[attr] = attr_completions
876875
else:
877-
CSS3_SPECIFIC_ATTRS_DICT[attr] = {}
876+
CSS3_SPECIFIC_ATTRS_DICT[attr] = []
878877
description = details.get("description")
879878
if description:
880879
desc_lines = textwrap.wrap(description, width=60)
@@ -1079,6 +1078,7 @@
10791078
]
10801079

10811080
# Add the css3 named colors.
1081+
#from codeintel2.util import CompareNPunctLast
10821082
#for attr, values in CSS_ATTR_DICT.items():
10831083
# if '#' in values or 'rbg(' in values:
10841084
# CSS_ATTR_DICT[attr] = sorted(values + css3_color_names,

libs/codeintel2/constants_css_microsoft_extensions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
import textwrap
66

7-
from codeintel2.util import CompareNPunctLast
8-
97
### START: Auto generated
108

119
CSS_MICROSOFT_DATA = {

libs/codeintel2/constants_css_moz_extensions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
import textwrap
66

7-
from codeintel2.util import CompareNPunctLast
8-
9-
107
# Auto generated from:
118
# 'src/codeintel/support/gencix/css/gen_moz_css_properties.py'
129

libs/codeintel2/constants_css_webkit_extensions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
import textwrap
66

7-
from codeintel2.util import CompareNPunctLast
8-
9-
107
### START: Auto generated
118

129
CSS_WEBKIT_DATA = {

libs/codeintel2/database/database.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ class Database(object):
304304
# version number should be used for small upgrades to the database.
305305
#
306306
# db change log:
307+
# - 2.0.22: (Node.js core API documentation parser changes)
308+
# - 2.0.21: (PHP namespace top-level-name performance tweaks)
307309
# - 2.0.20: (PHP namespace class inheritance scanning)
308310
# http://bugs.activestate.com/show_bug.cgi?id=84840
309311
# - 2.0.19: (Tcl statements include lassign)
@@ -348,7 +350,7 @@ class Database(object):
348350
# - 2.0.2: added scan_error to res_index in LangZone and MultiLangZone,
349351
# add "lang" file to lang zones for reverse safe_lang -> lang lookup
350352
# - 2.0.1: s/VERSION.txt/VERSION/, made PHP a MultiLangZone
351-
VERSION = "2.0.20"
353+
VERSION = "2.0.22"
352354

353355
LEN_PREFIX = 3 # Length of prefix in 'toplevelprefix_index' indeces.
354356

@@ -592,6 +594,8 @@ def _upgrade_wipe_db_langs(self, curr_ver, result_ver, langs):
592594
"2.0.17": (VERSION, _upgrade_wipe_db_langs, ["PHP"]),
593595
"2.0.18": (VERSION, _upgrade_wipe_db_langs, ["Tcl"]),
594596
"2.0.19": (VERSION, _upgrade_wipe_db_langs, ["PHP"]),
597+
"2.0.20": (VERSION, _upgrade_wipe_db_langs, ["PHP"]),
598+
"2.0.21": (VERSION, _upgrade_wipe_db_langs, ["Node.js"]),
595599
}
596600

597601
def report_event(self, desc):

0 commit comments

Comments
 (0)