public virtual bool visitEnter(FunctionCall functionCall) { functionCall.accept(virtualMachine); evaluation.Push(virtualMachine.returnValue); return false; }
bool visitLeave(FunctionCall functionCall) { scopes.Dequeue(); return false; }
public bool visitLeave(FunctionCall functionCall) { return true; }
bool visitEnter(FunctionCall functionCall) { Identifier identifier = functionCall.functionName; ArgumentList argumentList = functionCall.argumentList; //std::cout + identifier.getName()); returnValue = new NullValue(); Function function = scopes.First().getFunction(identifier); scopes.Enqueue(new Scope(scopes.First())); if (argumentList != null && argumentList.arguments.Count > 0) { List<Value.Value> valueList = new List<Value.Value>(); foreach (Expression ex in argumentList.arguments) { valueList.Add(expressionEvaluator.resolve(scopes.First(), ex)); } function.mapScope(scopes.First(), valueList); } Value.Value tempValue = function.execute(scopes.First()); if (tempValue != null) { returnValue = tempValue; } return false; }
public bool visitEnter(FunctionCall functionCall) { return true; }