From 7a6ace5db1d54923dd2f5ebc1338f2d71c168a06 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) }