示例#1
0
 public BoundGotoStatement(BoundLabel label)
 {
     Label = label;
 }
示例#2
0
 public BoundWhileStatement(BoundExpression condition, BoundStatement body, BoundLabel bodyLabel, BoundLabel breakLabel, BoundLabel continueLabel)
     : base(body, bodyLabel, breakLabel, continueLabel)
 {
     Condition = condition;
 }
示例#3
0
 protected BoundLoopStatement(BoundLabel breakLabel, BoundLabel continueLabel)
 {
     BreakLabel    = breakLabel;
     ContinueLabel = continueLabel;
 }
 public BoundBeginTryStatement(BoundLabel errorLabel)
 {
     ErrorLabel = errorLabel;
 }
示例#5
0
 public BoundLabelStatement(BoundLabel label, bool isValid) : base(isValid)
 {
     Label = label;
 }
示例#6
0
 public BoundDoWhileStatement(BoundStatement body, BoundExpression condition, BoundLabel breakLabel, BoundLabel continueLabel) : base(breakLabel, continueLabel)
 {
     Body          = body;
     Condition     = condition;
     BreakLabel    = breakLabel;
     ContinueLabel = continueLabel;
 }
示例#7
0
 public BoundForStatement(BoundExpression initializer, BoundExpression condition, BoundExpression loop, BoundStatement body, BoundLabel breakLabel, BoundLabel continueLabel)
     : base(breakLabel, continueLabel)
 {
     this.Initializer = initializer;
     this.Condition   = condition;
     this.Loop        = loop;
     this.Body        = body;
 }
 public BoundForStatement(BoundStatement variable, BoundExpression condition, BoundExpression action, BoundStatement body, BoundLabel breakLabel, BoundLabel continueLabel)
     : base(breakLabel, continueLabel)
 {
     Variable  = variable;
     Condition = condition;
     Action    = action;
     Body      = body;
 }
示例#9
0
            public override void VisitLabel(BoundLabel node)
            {
                _labels.Add(node.Statement, node.Label);

                base.VisitLabel(node);
            }
示例#10
0
 public virtual void VisitLabel(BoundLabel node)
 {
     DefaultVisit(node);
 }
示例#11
0
 private void OutputLabel(BoundLabel node, string prefix)
 {
     builder.AddFragment(new OutputFragment(prefix, DefaultColour));
     builder.AddFragment(new OutputFragment("#" + node.Label.Name, LabelColour));
 }
示例#12
0
 protected BoundLoopStatement(BoundStatement body, BoundLabel bodyLabel, BoundLabel breakLabel, BoundLabel continueLabel)
 {
     Body          = body;
     BodyLabel     = bodyLabel;
     BreakLabel    = breakLabel;
     ContinueLabel = continueLabel;
 }
示例#13
0
 public BoundGotoStatement(BoundLabel boundLabel)
 {
     BoundLabel = boundLabel;
 }
示例#14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BoundConditionalGotoStatement"/> class.
 /// </summary>
 /// <param name="label">The label.</param>
 /// <param name="condition">The condition.</param>
 /// <param name="jumpIfTrue">Whether to jump on true, or on false.</param>
 public BoundConditionalGotoStatement(BoundLabel label, BoundExpression condition, bool jumpIfTrue = true)
 {
     Label      = label;
     Condition  = condition;
     JumpIfTrue = jumpIfTrue;
 }
示例#15
0
 protected virtual BoundLabel RewriteLabelStatement(BoundLabel statement)
 {
     return(statement);
 }
示例#16
0
        public override BoundNode VisitLabel(BoundLabel node)
        {
            Debug.Assert(true, "we should not have label expressions at this stage");

            return node;
        }
示例#17
0
 private void EmitLabel(BoundLabel node)
 {
     _labels.Add(node.Statement, node.Label);
     EmitStatement(node.Statement);
 }