public virtual void VisitBlockExpression(BlockExpression expression) { VisitNodes(expression.Parameters); VisitNodes(expression.Statements); VisitCommonExpNodes(expression); }
public LambdaExpression(BlockExpression inner) { }
public void blockargs( BlockExpression bexp ) //throws RecognitionException, TokenStreamException { ParameterVarIdentifier ident = null; match(BOR); ident=methodParam(); if (0==inputState.guessing) { bexp.AddBlockFormalParameter(ident); } { // ( ... )* for (;;) { if ((LA(1)==COMMA)) { match(COMMA); ident=methodParam(); if (0==inputState.guessing) { bexp.AddBlockFormalParameter(ident); } } else { goto _loop97_breakloop; } } _loop97_breakloop: ; } // ( ... )* match(BOR); }
public BlockExpression block() //throws RecognitionException, TokenStreamException { BlockExpression bexp; bexp = new BlockExpression(); if (0==inputState.guessing) { PushScope(bexp, ScopeType.Block); } { switch ( LA(1) ) { case DO: { { match(DO); nothing(); { switch ( LA(1) ) { case BOR: { blockargs(bexp); break; } case EOF: case CLASS: case DO: case END: case DEF: case BEGIN: case NUM_INT: case NUM_FLOAT: case NUM_LONG: case STATEMENT_END: case IDENT: case STATICIDENT: case INSTIDENT: case SEMI: case LITERAL_self: case LPAREN: case LITERAL_require: case LITERAL_redo: case LITERAL_break: case LITERAL_next: case LITERAL_retry: case LITERAL_lambda: case LCURLY: case LITERAL_raise: case LITERAL_yield: case LITERAL_not: case LNOT: case PLUS: case MINUS: case BNOT: case LBRACK: case LITERAL_base: case STRING_LITERAL: case CHAR_LITERAL: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1) ) { case EOF: case STATEMENT_END: case SEMI: { statement_term(); break; } case CLASS: case DO: case END: case DEF: case BEGIN: case NUM_INT: case NUM_FLOAT: case NUM_LONG: case IDENT: case STATICIDENT: case INSTIDENT: case LITERAL_self: case LPAREN: case LITERAL_require: case LITERAL_redo: case LITERAL_break: case LITERAL_next: case LITERAL_retry: case LITERAL_lambda: case LCURLY: case LITERAL_raise: case LITERAL_yield: case LITERAL_not: case LNOT: case PLUS: case MINUS: case BNOT: case LBRACK: case LITERAL_base: case STRING_LITERAL: case CHAR_LITERAL: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } suite(bexp.Statements); match(END); } break; } case LCURLY: { { match(LCURLY); nothing(); { switch ( LA(1) ) { case BOR: { blockargs(bexp); break; } case EOF: case CLASS: case DO: case DEF: case BEGIN: case NUM_INT: case NUM_FLOAT: case NUM_LONG: case STATEMENT_END: case IDENT: case STATICIDENT: case INSTIDENT: case SEMI: case LITERAL_self: case LPAREN: case LITERAL_require: case LITERAL_redo: case LITERAL_break: case LITERAL_next: case LITERAL_retry: case LITERAL_lambda: case LCURLY: case RCURLY: case LITERAL_raise: case LITERAL_yield: case LITERAL_not: case LNOT: case PLUS: case MINUS: case BNOT: case LBRACK: case LITERAL_base: case STRING_LITERAL: case CHAR_LITERAL: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1) ) { case EOF: case STATEMENT_END: case SEMI: { statement_term(); break; } case CLASS: case DO: case DEF: case BEGIN: case NUM_INT: case NUM_FLOAT: case NUM_LONG: case IDENT: case STATICIDENT: case INSTIDENT: case LITERAL_self: case LPAREN: case LITERAL_require: case LITERAL_redo: case LITERAL_break: case LITERAL_next: case LITERAL_retry: case LITERAL_lambda: case LCURLY: case RCURLY: case LITERAL_raise: case LITERAL_yield: case LITERAL_not: case LNOT: case PLUS: case MINUS: case BNOT: case LBRACK: case LITERAL_base: case STRING_LITERAL: case CHAR_LITERAL: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } suite(bexp.Statements); match(RCURLY); } break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } if (0==inputState.guessing) { PopScope(); } return bexp; }
public override void VisitBlockExpression(BlockExpression expression) { nodeStack.Push( CurrentNode.Nodes.Add("BlockExpression [" + expression.Parameters.Count + " params ] " )); CurrentNode.Tag = expression; base.VisitBlockExpression(expression); nodeStack.Pop(); }
public LambdaExpression(BlockExpression block) { this.block = block; }