public void Visit(VariableDeclareStatement vardecl) { if (vardecl.init == null) { EvaluationStack.Push(new StackValue(ValType.Null, null)); } else { vardecl.init.Accept(this); } vardecl.ident.Accept(this); EvaluationStack.Push(StackValue.CreateStackValue(new Token(TokenType.VAR))); }
public void Visit(Assignment ass) { ass.expression.Accept(this); ass.ident.Accept(this); EvaluationStack.Push(StackValue.CreateStackValue(new Token(TokenType.ASSIGN, "="))); }
public void Visit(UnaryOperation unop) { unop.operand.Accept(this); EvaluationStack.Push(StackValue.CreateStackValue(unop.op)); }
public void Visit(Operand op) { var tttt = StackValue.CreateStackValue(op.token); EvaluationStack.Push(tttt); }
public void Visit(BinaryOperation binop) { binop.leftnode.Accept(this); binop.rightnode.Accept(this); EvaluationStack.Push(StackValue.CreateStackValue(binop.op)); }