From 55a3650b6c70c26055a937a5a5866c7379f6a494 Mon Sep 17 00:00:00 2001 From: rayan6ms Date: Wed, 18 Feb 2026 17:24:26 -0300 Subject: [PATCH] Fix ANTLR grammar: add catch-all hidden lexer rule to prevent tokenization errors --- .../super-factory-manager-language/syntaxes/SFML.g4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/visual-studio-code/super-factory-manager-language/syntaxes/SFML.g4 b/platform/visual-studio-code/super-factory-manager-language/syntaxes/SFML.g4 index ee6f13f95..c50c7099d 100644 --- a/platform/visual-studio-code/super-factory-manager-language/syntaxes/SFML.g4 +++ b/platform/visual-studio-code/super-factory-manager-language/syntaxes/SFML.g4 @@ -4,7 +4,7 @@ grammar SFML; //go to SFMLLexer.ts after going antlr command on the package.json and solve the 2 issues @lexer::members { - public boolean INCLUDE_UNUSED = false; // we want syntax highlighting to not break on unexpected tokens + public INCLUDE_UNUSED: boolean = false; // we want syntax highlighting to not break on unexpected tokens } program : name? trigger* EOF; @@ -279,7 +279,7 @@ WS ; UNUSED - : {INCLUDE_UNUSED}? . -> channel(HIDDEN) + : {this.INCLUDE_UNUSED}? . -> channel(HIDDEN) ; fragment A :('a' | 'A') ;