public virtual bool visitEnter(FunctionCall functionCall)
        {
            functionCall.accept(virtualMachine);

            evaluation.Push(virtualMachine.returnValue);

            return false;
        }
Example #2
0
 bool visitLeave(FunctionCall functionCall)
 {
     scopes.Dequeue();
     return false;
 }
Example #3
0
 public bool visitLeave(FunctionCall functionCall)
 {
     return true;
 }
Example #4
0
        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;
        }
Example #5
0
 public bool visitEnter(FunctionCall functionCall)
 {
     return true;
 }