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

parameter_declaration() public méthode

public parameter_declaration ( INodeWithParameters m ) : void
m INodeWithParameters
Résultat void
        public void parameter_declaration(INodeWithParameters m)
        {
            try
            {
                TypeReference reference;
                switch (this.LA(1))
                {
                    case 0x63:
                        this.attributes();
                        break;

                    case 12:
                    case 0x10:
                    case 0x21:
                    case 0x3b:
                        break;

                    default:
                        throw new NoViableAltException(this.LT(1), this.getFilename());
                }
                IToken token = this.identifier();
                switch (this.LA(1))
                {
                    case 0x42:
                        this.match(0x42);
                        reference = this.type_reference();
                        break;

                    case 0x40:
                    case 0x43:
                        break;

                    default:
                        throw new NoViableAltException(this.LT(1), this.getFilename());
                }
                if (base.inputState.guessing == 0)
                {
                    ParameterDeclaration declaration;
                    ParameterDeclaration declaration1 = declaration = new ParameterDeclaration(ToLexicalInfo(token));
                    declaration.set_Name(token.getText());
                    declaration.set_Type(reference);
                    ParameterDeclaration node = declaration;
                    m.get_Parameters().Add(node);
                    this.FlushAttributes(node);
                }
            }
            catch (RecognitionException exception)
            {
                if (base.inputState.guessing != 0)
                {
                    throw;
                }
                this.reportError(exception);
                this.recover(exception, tokenSet_18_);
            }
        }
UnityScriptParser