Ejemplo n.º 1
0
        public void Visit(VariableDefinition node)
        {
            if (DEBUG)
            {
                Console.WriteLine($"Visiting {node.GetType()}");
            }

            foreach (var child in node.children)
            {
                Visit((dynamic)child);
            }
        }
Ejemplo n.º 2
0
        public void Visit(VariableDefinition node)
        {
            if (DEBUG)
            {
                Console.WriteLine($"Visiting {node.GetType()}");
            }
            if (globalFunctions[currentFunction].localVariables == null)
            {
                globalFunctions[currentFunction].localVariables = new Dictionary <string, LocalFunctionFields> ();
            }
            VisitChildren(node);
            if (DEBUG)
            {
                Console.WriteLine("Local Variable Table");
                Console.WriteLine("============");
            }

            foreach (var entry in globalFunctions[currentFunction].localVariables)
            {
                Console.WriteLine(entry.Key + "\t");
            }
        }