Fill out all reserved words

This commit is contained in:
Greg Shuflin 2021-11-13 13:23:21 -08:00
parent 6cd5a9353c
commit 8fe7fca88c

View File

@ -333,8 +333,8 @@ peg::parser! {
rule identifier() -> &'input str = rule identifier() -> &'input str =
!reserved() text:$(['a'..='z' | 'A'..='Z' | '_'] ['a'..='z' | 'A'..='Z' | '0'..='9' | '_']*) { text } !reserved() text:$(['a'..='z' | 'A'..='Z' | '_'] ['a'..='z' | 'A'..='Z' | '0'..='9' | '_']*) { text }
//TODO flesh out more rule reserved() = "if" / "then" / "else" / "is" / "fn" / "for" / "while" / "let" / "in" / "mut" / "return" /
rule reserved() = "module" / "if" / "then" "break" / "alias" / "type" / "self" / "Self" / "interface" / "impl" / "true" / "false" / "module" / "import"
rule if_expr() -> ExpressionKind = rule if_expr() -> ExpressionKind =