diff options
author | qunyanm <unknown> | 2015-11-10 15:53:39 -0800 |
---|---|---|
committer | qunyanm <unknown> | 2015-11-10 15:53:39 -0800 |
commit | 324c2f4bf8842cce7922e7ff7972216dfc06546f (patch) | |
tree | 6554d1c5d1fbdab85af2a04e1d44ae709b41ac7f /Source/Dafny/Parser.cs | |
parent | 23067608f2d8855abd64982cabfe7f0c7f8e4f5a (diff) |
Fix issue 101. Instead of swapping operands for Exp opcode in BinaryExpr,
swap them when the expr is first created in parser or for calcstmt. This
avoids problems of operands being swapped again when the expr is copied.
Diffstat (limited to 'Source/Dafny/Parser.cs')
-rw-r--r-- | Source/Dafny/Parser.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Dafny/Parser.cs b/Source/Dafny/Parser.cs index 6a5f32ab..b6a59f4e 100644 --- a/Source/Dafny/Parser.cs +++ b/Source/Dafny/Parser.cs @@ -3267,12 +3267,13 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo ExpliesOp();
x = t;
LogicalExpression(out e1, allowSemi, allowLambda);
- e0 = new BinaryExpr(x, BinaryExpr.Opcode.Exp, e0, e1);
+ e0 = new BinaryExpr(x, BinaryExpr.Opcode.Exp, e1, e0);
while (IsExpliesOp()) {
ExpliesOp();
x = t;
LogicalExpression(out e1, allowSemi, allowLambda);
- e0 = new BinaryExpr(x, BinaryExpr.Opcode.Exp, e0, e1);
+ e0 = new BinaryExpr(x, BinaryExpr.Opcode.Exp, e1, e0);
+
}
} else SynErr(219);
}
|