From 11569fdec123e9c7aeaf38d8a122842c4c758fdf Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 14 Jan 2017 19:41:51 -0800 Subject: parse out exponentiation --- modelica-parser-lalrpop/src/ast.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modelica-parser-lalrpop/src/ast.rs') diff --git a/modelica-parser-lalrpop/src/ast.rs b/modelica-parser-lalrpop/src/ast.rs index f1e7d93..317944b 100644 --- a/modelica-parser-lalrpop/src/ast.rs +++ b/modelica-parser-lalrpop/src/ast.rs @@ -103,6 +103,7 @@ pub enum MathUnaryFunc { pub enum BinOperator { Multiply, Divide, + Exponentiate, Add, Subtract, } @@ -313,6 +314,8 @@ impl Debug for BinOperator { match *self { Multiply => write!(fmt, "*"), Divide => write!(fmt, "/"), + // TODO: this doesn't really work here + Exponentiate => write!(fmt, "^"), Add => write!(fmt, "+"), Subtract => write!(fmt, "-"), } -- cgit v1.2.3