From 79d7a901554ffe85575c29eec55accdb975bd4b7 Mon Sep 17 00:00:00 2001 From: camila314 <47485054+camila314@users.noreply.github.com> Date: Mon, 10 Feb 2025 11:58:20 -0600 Subject: [PATCH 1/2] Fix auto-generated syntaxes not filling gaps --- plugins/syntaxtest_dev.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/syntaxtest_dev.py b/plugins/syntaxtest_dev.py index f5a68a76..7269a08f 100644 --- a/plugins/syntaxtest_dev.py +++ b/plugins/syntaxtest_dev.py @@ -535,6 +535,7 @@ def __init__(self, region, scope, children=None): @classmethod def build_forest(cls, tokens, *, trim_suffix=False): + print(tokens) tokens = [ (region, cls._split_scope(scope, trim_suffix=trim_suffix)) for region, scope in tokens @@ -561,7 +562,7 @@ def _split_scope(scope, *, trim_suffix=False): def _insert(cls, forest, region, scopes): if scopes: first, *rest = scopes - if forest and forest[-1].scope == first: + if forest and forest[-1].scope == first and forest[-1].region.b == region.a: forest[-1].region = forest[-1].region.cover(region) else: forest.append(cls(region, first)) From 2785f3fcb8e2a7739facea4959eb15d3106741b8 Mon Sep 17 00:00:00 2001 From: camila <47485054+camila314@users.noreply.github.com> Date: Mon, 10 Feb 2025 12:08:05 -0600 Subject: [PATCH 2/2] remove print --- plugins/syntaxtest_dev.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/syntaxtest_dev.py b/plugins/syntaxtest_dev.py index 7269a08f..af6c8fb0 100644 --- a/plugins/syntaxtest_dev.py +++ b/plugins/syntaxtest_dev.py @@ -535,7 +535,6 @@ def __init__(self, region, scope, children=None): @classmethod def build_forest(cls, tokens, *, trim_suffix=False): - print(tokens) tokens = [ (region, cls._split_scope(scope, trim_suffix=trim_suffix)) for region, scope in tokens