From b8e8aead93c19e7f2cd0e0d3c693ee1a5c4e52cd Mon Sep 17 00:00:00 2001 From: smallmodel <15067410+smallmodel@users.noreply.github.com> Date: Mon, 22 Jan 2024 22:19:15 +0100 Subject: [PATCH] Fixed issues with multiple consecutive dollars This fixes the issue with scripts, like `m6l1c` that accidentally use double dollars for targetnames, like `$$player` --- code/parser/lex_source.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/parser/lex_source.txt b/code/parser/lex_source.txt index 6f3bb3d2..e61c6654 100644 --- a/code/parser/lex_source.txt +++ b/code/parser/lex_source.txt @@ -286,7 +286,7 @@ varname [a-zA-Z0-9_\"]+ "&=" { YYLEX( TOKEN_AND_EQUALS ); } "^=" { YYLEX( TOKEN_EXCL_OR_EQUALS ); } "|=" { YYLEX( TOKEN_OR_EQUALS ); } -"$" { BEGIN( VARIABLES ); YYLEX( TOKEN_DOLLAR ); } +[$]+ { BEGIN( VARIABLES ); YYLEX( TOKEN_DOLLAR ); } "!" { YYLEX( TOKEN_NOT ); } "~" { YYLEX( TOKEN_COMPLEMENT ); }