示例#1
0
 public void Add(VarDefNode varDef)
 {
     string varName = varDef.VarSpec.Name;
     if (IsDefinedHere(varName))
         throw new InterpreterException("Multiple definitions within the same scope for variable: " + varName);
     Variables[varName] = new IntVariable(varDef);
 }
示例#2
0
 public void Add(string varName, IntVariable var)
 {
     if (IsDefinedHere(varName))
         throw new InterpreterException("Multiple definitions within the same scope for variable: " + varName);
     Variables[varName] = var;
 }