Esempio n. 1
0
        List <StatementNode> OptionalStatementList()
        {
            printDebug("Optional Statement List");
            TokenType[] nuevo = new TokenType[] {
                TokenType.VAR_KEYWORD, TokenType.BRACE_OPEN, TokenType.END_STATEMENT
            }.Concat(iteration_statements).Concat(selection_statements).Concat(jump_statements).ToArray();

            if (MatchAny(nuevo.Concat(unary_operators).Concat(types).Concat(literals).Concat(unary_expression_options).ToArray()))
            {
                return(StatementList());
            }
            else
            {
                return(new List <StatementNode>());
            }
        }