protected internal Return(NRefactory.ReturnStatement returnStatement, IScope scope, INRefcatoryExpressionVisitor visitor)
            : base(scope, visitor) {
            _returnStatement = returnStatement;
            Value = returnStatement.Expression.AcceptVisitor(Visitor, ParentScope);

            if (Value != null) {
                InternalType = Value.Type;
                Target = RootScope.BranchingRegistry.RegisterReturnStatementLabel(InternalType);
            }
        }
Example #2
0
        protected internal Return(NRefactory.ReturnStatement returnStatement, IScope scope, INRefcatoryExpressionVisitor visitor)
            : base(scope, visitor)
        {
            _returnStatement = returnStatement;
            Value            = returnStatement.Expression.AcceptVisitor(Visitor, ParentScope);

            if (Value != null)
            {
                InternalType = Value.Type;
                Target       = RootScope.BranchingRegistry.RegisterReturnStatementLabel(InternalType);
            }
        }
 public static Return Return(NRefactory.ReturnStatement returnStatement, IScope scope, INRefcatoryExpressionVisitor visitor)
 {
     return(new Return(returnStatement, scope, visitor));
 }
 public override void VisitReturnStatement(ReturnStatement returnStatement)
 {
     VisitChildren(returnStatement);
     FixSemicolon(returnStatement.SemicolonToken);
 }
Example #5
0
 void IAstVisitor.VisitReturnStatement(ReturnStatement returnStatement)
 {
     Visit(EnterReturnStatement, LeaveReturnStatement, returnStatement);
 }
Example #6
0
 public virtual S VisitReturnStatement(ReturnStatement returnStatement, T data)
 {
     return(VisitChildren(returnStatement, data));
 }
 public virtual S VisitReturnStatement(ReturnStatement returnStatement, T data)
 {
     throw new NotImplementedException();
 }
Example #8
0
 public override AstExpression VisitReturnStatement(NRefactory.ReturnStatement returnStatement, IScope scope)
 {
     return(AstExpression.Return(returnStatement, scope, this));
 }