summaryrefslogtreecommitdiff
path: root/Source/Core/ResolutionContext.cs
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-06-05 15:03:09 -0400
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-06-05 15:03:09 -0400
commit618f037a466cd4392be6e1f4b20e248d58447456 (patch)
tree3c0b51de79e3537d3e94c8f1cca46f32d9a4b974 /Source/Core/ResolutionContext.cs
parent636108e4c302a24ed658b5f09812010b30e36e95 (diff)
parent41082463d783d6f8d8a5aaf69bf459b57bca6000 (diff)
Merge branch 'dfsg_free'
Diffstat (limited to 'Source/Core/ResolutionContext.cs')
-rw-r--r--Source/Core/ResolutionContext.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/Core/ResolutionContext.cs b/Source/Core/ResolutionContext.cs
index 474a91dd..279e00bf 100644
--- a/Source/Core/ResolutionContext.cs
+++ b/Source/Core/ResolutionContext.cs
@@ -339,6 +339,18 @@ namespace Microsoft.Boogie {
varContext = varContext.ParentContext;
}
+ public readonly ISet<string> StatementIds = new HashSet<string>();
+
+ public void AddStatementId(IToken tok, string name)
+ {
+ if (StatementIds.Contains(name))
+ {
+ Error(tok, "more than one statement with same id: " + name);
+ return;
+ }
+ StatementIds.Add(name);
+ }
+
public void AddVariable(Variable var, bool global) {
Contract.Requires(var != null);
var previous = FindVariable(cce.NonNull(var.Name), !global);