From 10577fc72af7260255493999294eda8e4413b6a5 Mon Sep 17 00:00:00 2001 From: NanoTech Date: Tue, 6 Dec 2016 04:08:50 -0600 Subject: Add more ExprB rules --- src/grammar.lalrpop | 13 +++++++++++-- src/lexer.rs | 29 ++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/grammar.lalrpop b/src/grammar.lalrpop index e940da9..3d4603d 100644 --- a/src/grammar.lalrpop +++ b/src/grammar.lalrpop @@ -19,6 +19,11 @@ extern { Nat => Tok::Natural(), Bool => Tok::Bool(), Label => Tok::Identifier(), + Let => Tok::Reserved(Keyword::Let), + In => Tok::Reserved(Keyword::In), + If => Tok::Reserved(Keyword::If), + Then => Tok::Reserved(Keyword::Then), + Else => Tok::Reserved(Keyword::Else), Reserved => Tok::Reserved(), "(" => Tok::ParenL, @@ -43,7 +48,11 @@ pub Expr: BoxExpr = { // exprA ExprB: BoxExpr = { Lambda "("