Files
rgbds/test/asm/syntax-error-lexer-mode.asm
Rangi 80a376f045 Syntax errors resets the lexer right away
`DEF`, `REDEF`, etc disable EQUS expansion, and reading
macro or OPT arguments sets the lexer to raw mode.
Syntax errors resume normal parsing at the line's end,
but should resume normal tokenization even before that.
2021-05-22 16:08:55 -04:00

13 lines
323 B
NASM

newline equs "\n"
def x = 1 newline def y = 2
println "x={d:x}, y={d:y}"
; the lexer is already in normal mode at the `AF`, so `newline` gets expanded
def m = AF newline def n = 2
println "n={d:n}"
; the lexer is in raw mode at the `AF`, but the parser resets it to normal
def AF = 1 newline def q = 2
println "q={d:q}"