Disable EQUS expansion for raw symbols (by parsing them as strings) (#1648)

This commit is contained in:
Rangi
2025-02-15 10:44:51 +01:00
committed by GitHub
parent 3feb75f84f
commit b2e865ee2a
8 changed files with 206 additions and 17 deletions

View File

@@ -1915,8 +1915,8 @@ static Token yylex_NORMAL() {
// `token` is either a `SYMBOL` or a `LOCAL`, and both have a `std::string` value.
assume(token.value.holds<std::string>());
// Local symbols cannot be string expansions
if (token.type == T_(SYMBOL) && lexerState->expandStrings) {
// Raw symbols and local symbols cannot be string expansions
if (!raw && token.type == T_(SYMBOL) && lexerState->expandStrings) {
// Attempt string expansion
Symbol const *sym = sym_FindExactSymbol(token.value.get<std::string>());