InterpreterVisitor.VisitVariableElement C# (CSharp) Method

VisitVariableElement() public method

public VisitVariableElement ( VariableElement, element ) : void
element VariableElement,
return void
  public override void VisitVariableElement(VariableElement element){
    if(mVariableMap.ContainsKey(element.getText())){
      int element_value = (int) mVariableMap[element.getText()];
      mStack.Push(element_value);
    } else {
      //lets assume that the syntax has been checked for this example because I don't like the exception
      //propegation that will happen if I throw here
      //throw new Exception("Variable " + element.getText() + " not defined.");
    }
  }
  public override void VisitIntegerElement(IntegerElement element){