Exemplo n.º 1
0
 protected BoundLoopStatement(BoundNodeKind kind, SyntaxNode syntax, BoundLabel breakLabel, BoundLabel continueLabel)
     : base(kind, syntax)
 {
     this.BreakLabel    = breakLabel;
     this.ContinueLabel = continueLabel;
 }
Exemplo n.º 2
0
 public BoundWhileStatement(SyntaxNode syntax, BoundExpression condition, BoundStatement body, BoundLabel breakLabel, BoundLabel continueLabel)
     : base(BoundNodeKind.WhileStatement, syntax, breakLabel, continueLabel)
 {
     this.Condition = condition;
     this.Body      = body;
 }
Exemplo n.º 3
0
 public BoundForStatement(SyntaxNode syntax, VariableSymbol variable, BoundExpression lowerBound, BoundExpression upperBound, BoundStatement body, BoundLabel breakLabel, BoundLabel continueLabel)
     : base(BoundNodeKind.ForStatement, syntax, breakLabel, continueLabel)
 {
     this.Variable   = variable;
     this.LowerBound = lowerBound;
     this.UpperBound = upperBound;
     this.Body       = body;
 }
Exemplo n.º 4
0
 public BoundLabelStatement(SyntaxNode syntax, BoundLabel label)
     : base(BoundNodeKind.LabelStatement, syntax)
 {
     this.Label = label;
 }
Exemplo n.º 5
0
 public static BoundWhileStatement While(SyntaxNode syntax, BoundExpression condition, BoundStatement body, BoundLabel breakLabel, BoundLabel continueLabel)
 {
     return(new BoundWhileStatement(syntax, condition, body, breakLabel, continueLabel));
 }
Exemplo n.º 6
0
 public static BoundLabelStatement Label(SyntaxNode syntax, BoundLabel label)
 {
     return(new BoundLabelStatement(syntax, label));
 }
Exemplo n.º 7
0
 public static BoundConditionalGotoStatement GotoFalse(SyntaxNode syntax, BoundLabel label, BoundExpression condition)
 {
     return(new BoundConditionalGotoStatement(syntax, label, condition, false));
 }
Exemplo n.º 8
0
        public static BoundStatement If(SyntaxNode syntax, BoundExpression condition, BoundStatement thenStmt, BoundStatement?elseStmt, BoundLabel elseLabel, BoundLabel endLabel)
        {
            if (elseStmt == null)
            {
                return(If(syntax, condition, thenStmt, endLabel));
            }

            return(Block(syntax,
                         GotoFalse(syntax, elseLabel, condition),
                         thenStmt,
                         Goto(syntax, endLabel),
                         Label(syntax, elseLabel),
                         elseStmt,
                         Label(syntax, endLabel)));
        }
Exemplo n.º 9
0
 public static BoundStatement If(SyntaxNode syntax, BoundExpression condition, BoundStatement thenStmt, BoundLabel endLabel)
 {
     return(Block(syntax,
                  GotoFalse(syntax, endLabel, condition),
                  thenStmt,
                  Label(syntax, endLabel)));
 }