UnityScript.Parser.UnityScriptParser.macro_application_block C# (CSharp) Méthode

macro_application_block() public méthode

public macro_application_block ( Block container ) : void
container Block
Résultat void
        public void macro_application_block(Block container)
        {
            MacroStatement statement = new MacroStatement();
            ExpressionCollection ec = statement.get_Arguments();
            Block b = statement.get_Body();
            try
            {
                Token token = this.member();
                bool flag = false;
                if ((this.LA(1) == 0x3d) && tokenSet_13_.member(this.LA(2)))
                {
                    int num = this.mark();
                    flag = true;
                    base.inputState.guessing++;
                    try
                    {
                        this.match(0x3d);
                    }
                    catch (RecognitionException)
                    {
                        flag = false;
                    }
                    this.rewind(num);
                    base.inputState.guessing--;
                }
                if (flag)
                {
                    this.compound_statement(b);
                }
                else
                {
                    if (!tokenSet_16_.member(this.LA(1)) || !tokenSet_44_.member(this.LA(2)))
                    {
                        throw new NoViableAltException(this.LT(1), this.getFilename());
                    }
                    this.expression_list(ec);
                    this.compound_statement(b);
                }
                if (base.inputState.guessing == 0)
                {
                    statement.set_LexicalInfo(ToLexicalInfo(token));
                    statement.set_Name(token.getText());
                    container.Add(statement);
                }
            }
            catch (RecognitionException exception2)
            {
                if (base.inputState.guessing != 0)
                {
                    throw;
                }
                this.reportError(exception2);
                this.recover(exception2, tokenSet_15_);
            }
        }
UnityScriptParser