Beispiel #1
0
 public void AddConstant(int id, Variable value)
 {
     if (constants.ContainsKey(id))
     {
         constants[id] = value;
     }
     else
     {
         constants.Add(id, value);
     }
 }
Beispiel #2
0
 public override void SetProperty(string name, Variable value)
 {
     if (properties.ContainsKey(name))
     {
         properties[name] = value;
     }
     else
     {
         properties.Add(name, value);
     }
 }
Beispiel #3
0
 public static void Push(Variable arg)
 {
     stack.Push(arg);
 }
Beispiel #4
0
 public int setVariable(Variable variable)
 {
     variables.Add(variable);
     return variables.Count - 1;
 }
Beispiel #5
0
 public void SetVariableValue(string variable, Variable value)
 {
     Variable var = FindVariable(variable);
     if (var != null)
     {
         var.SetValue(value.Value);
     }
     else
     {
         VariableIdent ident = new VariableIdent()
         {
             FrameId = frameStack.Peek().Id,
             VariableName = variable
         };
         variables.Add(ident, value);
     }
 }
Beispiel #6
0
 public abstract void SetProperty(string name, Variable value);