diff --git a/src/asm/lexer.cpp b/src/asm/lexer.cpp index 1dc84e3a..3f444d17 100644 --- a/src/asm/lexer.cpp +++ b/src/asm/lexer.cpp @@ -2166,7 +2166,7 @@ static Token skipToLeadingKeyword() { } else if (isLetter(c)) { shiftChar(); std::string keyword(1, c); - for (c = peek(); continuesIdentifier(c) && c != '.'; c = nextChar()) { + for (c = peek(); continuesIdentifier(c); c = nextChar()) { keyword += c; } if (auto search = keywords.find(keyword); search != keywords.end()) { diff --git a/test/asm/local-after-end.asm b/test/asm/local-after-end.asm index ae31faf6..f52bc427 100644 --- a/test/asm/local-after-end.asm +++ b/test/asm/local-after-end.asm @@ -1,5 +1,5 @@ section "test", ROM0 -Global: +Global: ; none of the `end*.local_*` identifiers below should get treated as keywords if 0 println "no" diff --git a/test/asm/local-after-end.err b/test/asm/local-after-end.err index 5a950475..5528d9e3 100644 --- a/test/asm/local-after-end.err +++ b/test/asm/local-after-end.err @@ -1,14 +1,2 @@ -error: syntax error, unexpected local label, expecting end of line or end of buffer or end of fragment literal - at local-after-end.asm(6) -error: Identifier "endc.local_yes" begins with a keyword; did you mean to put a space between them? - at local-after-end.asm(9) -error: syntax error, unexpected local label, expecting end of line or end of buffer or end of fragment literal - at local-after-end.asm(13) -error: syntax error, unexpected local label, expecting end of line or end of buffer or end of fragment literal - at local-after-end.asm(16) -error: syntax error, unexpected local label, expecting end of line or end of buffer or end of fragment literal - at local-after-end.asm(20) -error: Undefined macro `mac` - at local-after-end.asm(21) FATAL: Ended block with 2 unterminated conditionals (`IF`/`ELIF`/`ELSE` blocks) at local-after-end.asm(22) diff --git a/test/asm/local-after-end.out b/test/asm/local-after-end.out deleted file mode 100644 index 7cfab5b0..00000000 --- a/test/asm/local-after-end.out +++ /dev/null @@ -1 +0,0 @@ -yes