Exemplo n.º 1
0
        Initializers initializer()
        {
            if (peek("{"))
            {
                match("{");
                List<Initializers> varInitializerList = new List<Initializers>();
                VariableInitializerList varInitList = initializer_list(varInitializerList);
                match("}");

                return varInitList;
            }
            else
            {
                Expr expresion = OR_expr();
                VariableInitializer varInitializer = new VariableInitializer(expresion);

                return varInitializer;
            }
        }
Exemplo n.º 2
0
 VariableInitializer enum_constant_expressionP()
 {
     if (peek("="))
     {
         match("=");
         Expr constantExpr = OR_expr();
         VariableInitializer varInit = new VariableInitializer(constantExpr);
         return varInit;
     }
     else
         return null;
     //null
 }