From 8fe7fca88ca2279af2e9572a04dbfab35861063e Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sat, 13 Nov 2021 13:23:21 -0800 Subject: [PATCH] Fill out all reserved words --- schala-lang/language/src/parsing/new.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schala-lang/language/src/parsing/new.rs b/schala-lang/language/src/parsing/new.rs index d5e119f..6ca0e04 100644 --- a/schala-lang/language/src/parsing/new.rs +++ b/schala-lang/language/src/parsing/new.rs @@ -333,8 +333,8 @@ peg::parser! { rule identifier() -> &'input str = !reserved() text:$(['a'..='z' | 'A'..='Z' | '_'] ['a'..='z' | 'A'..='Z' | '0'..='9' | '_']*) { text } - //TODO flesh out more - rule reserved() = "module" / "if" / "then" + rule reserved() = "if" / "then" / "else" / "is" / "fn" / "for" / "while" / "let" / "in" / "mut" / "return" / + "break" / "alias" / "type" / "self" / "Self" / "interface" / "impl" / "true" / "false" / "module" / "import" rule if_expr() -> ExpressionKind =