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

attribute_parameter() public method

public attribute_parameter ( Attribute attr ) : void
attr Attribute
return void
        public void attribute_parameter(Attribute attr)
        {
            try
            {
                Expression expression2;
                bool flag = false;
                if (((this.LA(1) == 12) || (this.LA(1) == 0x3b)) && ((this.LA(2) == 0x41) || (this.LA(2) == 0x4e)))
                {
                    int num = this.mark();
                    flag = true;
                    base.inputState.guessing++;
                    try
                    {
                        this.match(0x3b);
                        this.match(0x4e);
                    }
                    catch (RecognitionException)
                    {
                        flag = false;
                    }
                    this.rewind(num);
                    base.inputState.guessing--;
                }
                if (!flag)
                {
                    if (!tokenSet_16_.member(this.LA(1)) || !tokenSet_17_.member(this.LA(2)))
                    {
                        throw new NoViableAltException(this.LT(1), this.getFilename());
                    }
                    expression2 = this.expression();
                    if (base.inputState.guessing == 0)
                    {
                        attr.get_Arguments().Add(expression2);
                    }
                }
                else
                {
                    Expression expression = this.reference_expression();
                    this.match(0x4e);
                    expression2 = this.expression();
                    if (base.inputState.guessing == 0)
                    {
                        attr.get_NamedArguments().Add(new ExpressionPair(expression, expression2));
                    }
                }
            }
            catch (RecognitionException exception2)
            {
                if (base.inputState.guessing != 0)
                {
                    throw;
                }
                this.reportError(exception2);
                this.recover(exception2, tokenSet_18_);
            }
        }
UnityScriptParser