From faa5c6ab42785611fe4b5e73017e6fb0c74993bb Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 10 Feb 2018 17:45:00 -0800 Subject: [PATCH] Fix parse level calculation --- src/schala_lang/parsing.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/schala_lang/parsing.rs b/src/schala_lang/parsing.rs index 7112aca..7962e7e 100644 --- a/src/schala_lang/parsing.rs +++ b/src/schala_lang/parsing.rs @@ -760,6 +760,7 @@ impl Parser { next_token: format!("{:?}", next_token), level: self.parse_level, }; + self.parse_level += 1; self.parse_record.push(record); let mut lhs = self.prefix_expr()?; @@ -782,6 +783,7 @@ impl Parser { let operation = Operation(op_str); lhs = Expression(ExpressionType::BinExp(operation, Box::new(lhs), Box::new(rhs)), None); } + self.parse_level -= 1; Ok(lhs) }