summaryrefslogtreecommitdiff
path: root/Source/Core/ResolutionContext.cs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2016-02-12 16:47:51 -0800
committerGravatar Rustan Leino <leino@microsoft.com>2016-02-12 16:47:51 -0800
commit7ce69481c0b6af79a6d6542989832cd90fc5690f (patch)
treea91488b8ad92bc69718f2d5fda1d44082a3959de /Source/Core/ResolutionContext.cs
parentabee810ceedbf551194788164fdf723edc511c0c (diff)
parent5fb565e439255ede7dc3653708af41678b6c1062 (diff)
Merge branch 'master' of https://github.com/boogie-org/boogie
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);