Boo.Lang.Parser.BooParserBase.internal_closure_stmt C# (CSharp) Method

internal_closure_stmt() protected method

protected internal_closure_stmt ( Block block ) : void
block Block
return void
        protected void internal_closure_stmt(
		Block block
	)
        {
            Statement stmt = null;
                StatementModifier modifier = null;

            try {      // for error handling
            {
                switch ( LA(1) )
                {
                case RETURN:
                {
                    stmt=return_expression_stmt();
                    break;
                }
                case ESEPARATOR:
                case CAST:
                case CHAR:
                case FALSE:
                case NOT:
                case NULL:
                case RAISE:
                case SELF:
                case SUPER:
                case THEN:
                case TRUE:
                case TYPEOF:
                case YIELD:
                case TRIPLE_QUOTED_STRING:
                case LPAREN:
                case DOUBLE_QUOTED_STRING:
                case SINGLE_QUOTED_STRING:
                case ID:
                case MULTIPLY:
                case LBRACK:
                case COMMA:
                case SPLICE_BEGIN:
                case DOT:
                case LBRACE:
                case QQ_BEGIN:
                case SUBTRACT:
                case LONG:
                case INCREMENT:
                case DECREMENT:
                case ONES_COMPLEMENT:
                case INT:
                case BACKTICK_QUOTED_STRING:
                case RE_LITERAL:
                case DOUBLE:
                case FLOAT:
                case TIMESPAN:
                {
                    {
                        {
                            switch ( LA(1) )
                            {
                            case RAISE:
                            {
                                stmt=raise_stmt();
                                break;
                            }
                            case YIELD:
                            {
                                stmt=yield_stmt();
                                break;
                            }
                            default:
                                bool synPredMatched341 = false;
                                if (((LA(1)==ID) && (LA(2)==AS||LA(2)==COMMA)))
                                {
                                    int _m341 = mark();
                                    synPredMatched341 = true;
                                    inputState.guessing++;
                                    try {
                                        {
                                            declaration();
                                            match(COMMA);
                                        }
                                    }
                                    catch (RecognitionException)
                                    {
                                        synPredMatched341 = false;
                                    }
                                    rewind(_m341);
                                    inputState.guessing--;
                                }
                                if ( synPredMatched341 )
                                {
                                    stmt=unpack();
                                }
                                else if (((LA(1)==THEN||LA(1)==ID) && (tokenSet_98_.member(LA(2))))&&(IsValidClosureMacroArgument(LA(2)))) {
                                    stmt=closure_macro_stmt();
                                }
                                else if ((tokenSet_68_.member(LA(1))) && (tokenSet_99_.member(LA(2)))) {
                                    stmt=closure_expression_stmt();
                                }
                            else
                            {
                                throw new NoViableAltException(LT(1), getFilename());
                            }
                            break; }
                        }
                        {
                            switch ( LA(1) )
                            {
                            case IF:
                            case UNLESS:
                            case WHILE:
                            {
                                modifier=stmt_modifier();
                                if (0==inputState.guessing)
                                {
                                    stmt.Modifier = modifier;
                                }
                                break;
                            }
                            case EOL:
                            case EOS:
                            case RBRACE:
                            case QQ_END:
                            {
                                break;
                            }
                            default:
                            {
                                throw new NoViableAltException(LT(1), getFilename());
                            }
                             }
                        }
                    }
                    break;
                }
                default:
                {
                    throw new NoViableAltException(LT(1), getFilename());
                }
                 }
            }
            if (0==inputState.guessing)
            {

                        if (null != stmt)
                        {
                            block.Add(stmt);
                        }

            }
            }
            catch (RecognitionException ex)
            {
            if (0 == inputState.guessing)
            {
                reportError(ex, "internal_closure_stmt");
                recover(ex,tokenSet_96_);
            }
            else
            {
                throw ex;
            }
            }
        }
BooParserBase