public virtual void BeforeVisit(ReturnStatement node) { this.BeforeVisitCatchAll(node); }
AstNodeBase ParseReturn() { HappySourceLocation location = this.AssertExpect(HappyTokenKind.KeywordReturn).Location; ExpressionNodeBase returnExpression = null; if(_lexer.PeekToken().HappyTokenKind != HappyTokenKind.EndOfStatement) returnExpression = this.ParseExpression(ExpressionContext.Expression); AstNodeBase retval = new ReturnStatement(location, returnExpression); return retval; }
public virtual void AfterVisit(ReturnStatement node) { this.AfterVisitCatchAll(node); }
public override void AfterVisit(ReturnStatement node) { Expression @return = node.ReturnExp == null ? Expression.Constant(null) : _expressionStack.Pop(); _expressionStack.Push(node, Expression.Goto(_returnLabelTarget, Expression.Convert(@return, typeof(object)))); base.AfterVisit(node); }