summaryrefslogtreecommitdiff
path: root/Source/Dafny/DafnyAst.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Dafny/DafnyAst.cs')
-rw-r--r--Source/Dafny/DafnyAst.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Dafny/DafnyAst.cs b/Source/Dafny/DafnyAst.cs
index ba05d6a8..f29242ab 100644
--- a/Source/Dafny/DafnyAst.cs
+++ b/Source/Dafny/DafnyAst.cs
@@ -5642,6 +5642,21 @@ namespace Microsoft.Dafny {
}
}
+ /// <summary>
+ /// A NegationExpression e represents the value -e and is syntactic shorthand
+ /// for 0-e (for integers) or 0.0-e (for reals).
+ /// </summary>
+ public class NegationExpression : ConcreteSyntaxExpression
+ {
+ public readonly Expression E;
+ public NegationExpression(IToken tok, Expression e)
+ : base(tok) {
+ Contract.Requires(tok != null);
+ Contract.Requires(e != null);
+ E = e;
+ }
+ }
+
public class ChainingExpression : ConcreteSyntaxExpression
{
public readonly List<Expression> Operands;