UnityScript.Parser.UnityScriptParser.for_statement C# (CSharp) Method

for_statement() public method

public for_statement ( Block container ) : void
container Block
return void
        public void for_statement(Block container)
        {
            IToken token = null;
            try
            {
                Statement statement;
                token = this.LT(1);
                this.match(0x12);
                int num = this.LA(1);
                if (num == 12)
                {
                    this.match(12);
                    this.match(0x3f);
                    statement = this.for_in(container);
                }
                else
                {
                    if (num != 0x3f)
                    {
                        throw new NoViableAltException(this.LT(1), this.getFilename());
                    }
                    this.match(0x3f);
                    bool flag = false;
                    if (tokenSet_45_.member(this.LA(1)) && tokenSet_46_.member(this.LA(2)))
                    {
                        int num2 = this.mark();
                        flag = true;
                        base.inputState.guessing++;
                        try
                        {
                            num = this.LA(1);
                            switch (num)
                            {
                                case 12:
                                case 0x10:
                                case 0x21:
                                case 0x3b:
                                    this.identifier();
                                    break;

                                default:
                                    if (num != 0x2d)
                                    {
                                        throw new NoViableAltException(this.LT(1), this.getFilename());
                                    }
                                    this.declaration();
                                    break;
                            }
                            this.match(0x18);
                        }
                        catch (RecognitionException)
                        {
                            flag = false;
                        }
                        this.rewind(num2);
                        base.inputState.guessing--;
                    }
                    if (flag)
                    {
                        statement = this.for_in(container);
                    }
                    else
                    {
                        if (!tokenSet_47_.member(this.LA(1)) || !tokenSet_48_.member(this.LA(2)))
                        {
                            throw new NoViableAltException(this.LT(1), this.getFilename());
                        }
                        statement = this.for_c(container);
                    }
                }
                if ((base.inputState.guessing == 0) && (statement != null))
                {
                    statement.set_LexicalInfo(ToLexicalInfo(token));
                }
            }
            catch (RecognitionException exception2)
            {
                if (base.inputState.guessing != 0)
                {
                    throw;
                }
                this.reportError(exception2);
                this.recover(exception2, tokenSet_15_);
            }
        }
UnityScriptParser