Add comment processing, add a comment to factorial.sy to test it out
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
WHITESPACE = _{ " " | "\r" | "\t" | "\n" }
|
||||
newline = _{ "\n" | "\r\n" }
|
||||
WHITESPACE = _{ newline | " " | "\r" | "\t"}
|
||||
COMMENT = _{ "#" ~ (!newline ~ ANY)* }
|
||||
|
||||
int = @{ ASCII_DIGIT+ }
|
||||
float = @{ ASCII_DIGIT+ ~ "." ~ ASCII_DIGIT+ ~ ("e" ~ ("+" | "-")? ~ ASCII_DIGIT+)? }
|
||||
word_char = @{ ASCII_ALPHA | "_" | "?" | "-" | "+" | "*" | "/" | "=" | "@" | "$" | "%" | "^" | "&" | "|" | "~" }
|
||||
word = @{ word_char+ }
|
||||
// meta = ${ "%" ~ word }
|
||||
str = @{
|
||||
"\"" ~
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user