예제 #1
0
        public string Visit(Stmt_list_ node, int modo)
        {
            Console.WriteLine("aqui7");
            var str = "";

            foreach (var n in node)
            {
                str = str + Visit((dynamic)n, 2) + "\n";
            }
            return(str);
        }
예제 #2
0
        public Node stmt_list()
        {
            //Console.WriteLine("stmt_list");
            var stmt_list = new Stmt_list_();

            while (CurrentToken == TokenCategory.IDENTIFIER ||
                   CurrentToken == TokenCategory.IF ||
                   CurrentToken == TokenCategory.SWITCH ||
                   CurrentToken == TokenCategory.WHILE ||
                   CurrentToken == TokenCategory.FOR ||
                   CurrentToken == TokenCategory.DO ||
                   CurrentToken == TokenCategory.BREAK ||
                   CurrentToken == TokenCategory.CONTINUE ||
                   CurrentToken == TokenCategory.RETURN ||
                   CurrentToken == TokenCategory.SEMICOLON)
            {
                stmt_list.Add(stmt_());
                //Console.WriteLine("stmt_list2");
            }
            return(stmt_list);
        }
예제 #3
0
 public void Visit(Stmt_list_ node, int modo)
 {
     VisitChildren(node, modo);
     //return 0;
 }