summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGravatar mikebarnett <unknown>2011-02-09 22:38:18 +0000
committerGravatar mikebarnett <unknown>2011-02-09 22:38:18 +0000
commit5e3c0a829e9853a145c1d7e176a3647994f1fc98 (patch)
treeeaf4c63a0e61f4b1a846aecb21da8ee7380de304 /Source
parentfd13d4b27c87254c7682df6cce71a969227b47fb (diff)
Changed the API for Declaration.AddAttribute so it takes a params argument so multiple parameters can be added to an attribute at one go. No calls had to be changed because of the way params arguments work.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Absy.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/Absy.cs b/Source/Core/Absy.cs
index 64b15be7..3e2fcc6b 100644
--- a/Source/Core/Absy.cs
+++ b/Source/Core/Absy.cs
@@ -859,18 +859,17 @@ namespace Microsoft.Boogie {
return true;
}
- public void AddAttribute(string name, object val) {
- Contract.Requires(val != null);
+ public void AddAttribute(string name, params object[] vals) {
Contract.Requires(name != null);
QKeyValue kv;
for (kv = this.Attributes; kv != null; kv = kv.Next) {
if (kv.Key == name) {
- kv.Params.Add(val);
+ kv.Params.AddRange(vals);
break;
}
}
if (kv == null) {
- Attributes = new QKeyValue(tok, name, new List<object/*!*/>(new object/*!*/[] { val }), Attributes);
+ Attributes = new QKeyValue(tok, name, new List<object/*!*/>(vals), Attributes);
}
}