diff options
Support for line numbers and comments
1 files changed, 11 insertions, 1 deletions
| -rw-r--r-- | spasm/src/asm/lexer.re | 12 |
diff --git a/spasm/src/asm/lexer.re b/spasm/src/asm/lexer.re index 4ab16d1..fabeaf7 100644 --- a/spasm/src/asm/lexer.re +++ b/spasm/src/asm/lexer.re @@ -253,8 +253,18 @@ IDENTIFIER { continue; } +DIGIT* ":" { + token_start = cursor; + + continue; + } +"#" .* "\n" { + ++lineno; + token_start = cursor; -"\n" { + continue; + } +"\n" { ++lineno; token_start = cursor; |
