/// <summary> /// Add an inline tactic to the top level frame /// </summary> /// <param name="key"></param> /// <param name="value"></param> public void AddInlineTactic(string key, InlineTacticBlockStmt stmt) { Contract.Requires <ArgumentNullException>(key != null, "key"); if (ContainTVal(key)) { throw new Exception("tactic variable " + key + " has already been defined !"); } _scope.Peek().AddInlineTactic(key, stmt); }
internal void AddInlineTactic(string name, InlineTacticBlockStmt stmt) { Contract.Requires <ArgumentNullException>(name != null, "key"); if (_inlineTactics.All(v => v.Key != name)) { _inlineTactics.Add(name, stmt); } else { throw new ArgumentException($"inline tactic {name} is already declared in the scope"); } }