Example #1
0
 private void FunctionEnter(IFuncNameToken t)
 {
     m_functions.Push(t.ToString());
     m_argsCounters.Push(0);
     m_maxArgs.Push(Tables.FunctionsArgsNumberTable[t.ToString()]);
     m_bracketValues.Push(m_bracketCounter);
 }
Example #2
0
        public override void Visit(IFuncNameToken t)
        {
            // Get number of nessessary arguments
            int n = Tables.FunctionsArgsNumberTable[t.ToString()];

            // Pop arguments
            ExpNode[] arguments = new ExpNode[n];
            for (int i = 0; i < n; i++)
            {
                arguments[i] = m_nodes.Pop();
            }

            m_nodes.Push(Tables.FunctionsExpTable[t.ToString()](arguments));
        }