Skip to content

Commit 79d7a90

Browse files
committed
Fix auto-generated syntaxes not filling gaps
1 parent ec46274 commit 79d7a90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: plugins/syntaxtest_dev.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ def __init__(self, region, scope, children=None):
535535

536536
@classmethod
537537
def build_forest(cls, tokens, *, trim_suffix=False):
538+
print(tokens)
538539
tokens = [
539540
(region, cls._split_scope(scope, trim_suffix=trim_suffix))
540541
for region, scope in tokens
@@ -561,7 +562,7 @@ def _split_scope(scope, *, trim_suffix=False):
561562
def _insert(cls, forest, region, scopes):
562563
if scopes:
563564
first, *rest = scopes
564-
if forest and forest[-1].scope == first:
565+
if forest and forest[-1].scope == first and forest[-1].region.b == region.a:
565566
forest[-1].region = forest[-1].region.cover(region)
566567
else:
567568
forest.append(cls(region, first))

0 commit comments

Comments
 (0)