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

return_statement() public méthode

public return_statement ( Block b ) : void
b Block
Résultat void
        public void return_statement(Block b)
        {
            IToken token = null;
            try
            {
                Expression expression;
                token = this.LT(1);
                this.match(30);
                if (tokenSet_16_.member(this.LA(1)) && tokenSet_49_.member(this.LA(2)))
                {
                    expression = this.expression();
                }
                else if (!tokenSet_15_.member(this.LA(1)) || !tokenSet_20_.member(this.LA(2)))
                {
                    throw new NoViableAltException(this.LT(1), this.getFilename());
                }
                if (base.inputState.guessing == 0)
                {
                    ReturnStatement statement;
                    ReturnStatement statement1 = statement = new ReturnStatement(ToLexicalInfo(token));
                    statement.set_Expression(expression);
                    b.Add(statement);
                }
            }
            catch (RecognitionException exception)
            {
                if (base.inputState.guessing != 0)
                {
                    throw;
                }
                this.reportError(exception);
                this.recover(exception, tokenSet_15_);
            }
        }
UnityScriptParser