public BoundIfStatement(IfStatementSyntax syntax, BoundExpression condition, BoundStatement consequence, BoundStatement alternativeOpt) : base(BoundNodeKind.IfStatement, syntax) { Condition = condition; Consequence = consequence; AlternativeOpt = alternativeOpt; }
public BoundForStatement(ForStatementSyntax syntax, BoundVariableDeclaration declaration, ImmutableArray<BoundExpression> initializers, BoundExpression condition, ImmutableArray<BoundExpression> incrementors, BoundStatement body) : base(BoundNodeKind.ForStatement, syntax) { Declaration = declaration; Initializers = initializers; Condition = condition; Incrementors = incrementors; Body = body; }
protected virtual void VisitStatement(BoundStatement node) { switch (node.Kind) { case BoundNodeKind.Block: VisitBlock((BoundBlock) node); break; case BoundNodeKind.BreakStatement: VisitBreakStatement((BoundBreakStatement) node); break; case BoundNodeKind.DiscardStatement: VisitDiscardStatement((BoundDiscardStatement) node); break; case BoundNodeKind.DoStatement: VisitDoStatement((BoundDoStatement) node); break; case BoundNodeKind.ExpressionStatement: VisitExpressionStatement((BoundExpressionStatement) node); break; case BoundNodeKind.ForStatement: VisitForStatement((BoundForStatement) node); break; case BoundNodeKind.IfStatement: VisitIfStatement((BoundIfStatement) node); break; case BoundNodeKind.ReturnStatement: VisitReturnStatement((BoundReturnStatement) node); break; case BoundNodeKind.VariableDeclaration: VisitVariableDeclaration((BoundVariableDeclaration) node); break; case BoundNodeKind.MultipleVariableDeclarations: VisitMultipleVariableDeclarations((BoundMultipleVariableDeclarations) node); break; case BoundNodeKind.SwitchStatement: VisitSwitchStatement((BoundSwitchStatement) node); break; case BoundNodeKind.WhileStatement: VisitWhileStatement((BoundWhileStatement) node); break; case BoundNodeKind.NoOpStatement: VisitNoOpStatement((BoundNoOpStatement) node); break; default: throw new InvalidOperationException(node.Kind.ToString()); } }
public BoundDoStatement(DoStatementSyntax syntax, BoundExpression condition, BoundStatement body) : base(BoundNodeKind.DoStatement, syntax) { Condition = condition; Body = body; }