public override Statement VisitLabeledStatement(LabeledStatement lStatement) { if (lStatement.Statement is Block && !this.braceOnNewLine) WriteStart("{0}:", lStatement.Label.Name); else WriteLine("{0}:", lStatement.Label.Name); return base.VisitLabeledStatement(lStatement); }
public override Statement VisitLabeledStatement(LabeledStatement lStatement) { if (lStatement == null) return null; return base.VisitLabeledStatement((LabeledStatement)lStatement.Clone()); }
public virtual Statement VisitLabeledStatement(LabeledStatement lStatement) { if (lStatement == null) return null; lStatement.Statement = (Statement)this.Visit(lStatement.Statement); return lStatement; }
private LabeledStatement ParseLabeledStatement(Identifier label, TokenSet followers){ LabeledStatement result = new LabeledStatement(); result.SourceContext = label.SourceContext; result.Label = label; Debug.Assert(this.currentToken == Token.Colon); this.GetNextToken(); if (Parser.StatementStart[this.currentToken]){ result.Statement = this.ParseStatement(followers); result.SourceContext.EndPos = this.scanner.endPos; }else this.SkipTo(followers, Error.ExpectedSemicolon); return result; }
public override Statement VisitLabeledStatement(LabeledStatement lStatement) { if (lStatement == null) return null; if (replaceType == ReplaceType.LabeledStatement && lStatement.Label.Name == oldName.Name) return (Statement)newNode; lStatement.Statement = (Statement)this.Visit(lStatement.Statement); return lStatement; }
public override Statement VisitLabeledStatement(LabeledStatement lStatement) { if (lStatement == null) return null; BasicBlock savedCC = CurrentContinuation; this.Visit(lStatement.Statement); // If this is a branch target, make sure we build a separate BB for it. if (splicer.referencedLabels[lStatement.UniqueKey] != null) { BasicBlock bbTarget = (BasicBlock)branchTargets[lStatement.UniqueKey]; if (bbTarget == null) { bbTarget = new BasicBlock(null); AddBlock(bbTarget); bbTarget.MiddleOfTransition = true; branchTargets[lStatement.UniqueKey] = bbTarget; } // fix for the "Label:; atomic { ... }" problem if (savedCC == CurrentContinuation && ((insideAtomicBlock && (savedCC.RelativeAtomicLevel == 0)) || (!insideAtomicBlock && (savedCC.RelativeAtomicLevel > 0)))) { // create a new basic block with the correct // atomiticity level CurrentContinuation = AddBlock(new BasicBlock(null, CurrentContinuation)); } // Link this target block onto the front of the current chain bbTarget.UnconditionalTarget = CurrentContinuation; CurrentContinuation = bbTarget; } splicer.AddBlockLabel(CurrentContinuation, lStatement.Label.Name.Substring(3)); return lStatement; }
public override Statement VisitLabeledStatement(LabeledStatement lStatement) { WriteLine("{0}:", lStatement.Label.Name); return base.VisitLabeledStatement(lStatement); }
public EventingVisitor(Action<LabeledStatement> visitLabeledStatement) { VisitedLabeledStatement += visitLabeledStatement; } public event Action<LabeledStatement> VisitedLabeledStatement; public override Statement VisitLabeledStatement(LabeledStatement lStatement) { if (VisitedLabeledStatement != null) VisitedLabeledStatement(lStatement); return base.VisitLabeledStatement(lStatement); }