update lexer

pull/10/head
Matthew Butterick 8 years ago
parent 46f6ab0c36
commit bd180e6ed6

@ -6,9 +6,9 @@
(define basic-lexer (define basic-lexer
(lexer-srcloc (lexer-srcloc
[(eof) (return-without-srcloc eof)] [(eof) (return-without-srcloc eof)]
[(from/stop-before "rem" "\n") (token 'REM lexeme)]
["\n" (token 'NEWLINE)] ["\n" (token 'NEWLINE)]
[whitespace (token lexeme #:skip? #t)] [whitespace (token lexeme #:skip? #t)]
[(from/stop-before "rem" "\n") (token 'REM lexeme)]
[(:or "print" "goto" "end" "+" ":") lexeme] [(:or "print" "goto" "end" "+" ":") lexeme]
[digits (token 'INTEGER (string->number lexeme))] [digits (token 'INTEGER (string->number lexeme))]
[(:or (:seq (:? digits) "." digits) [(:or (:seq (:? digits) "." digits)

Loading…
Cancel
Save