public BoundGoToStatement(GoToStatementSyntax syntax, string label) { Debug.Assert(!syntax.IsDefault(), "'syntax' must not be null."); Debug.Assert(!label.IsDefault(), "'label' must not be null."); this.Syntax = syntax; this.Label = label; }
public override void VisitGoToStatement(GoToStatementSyntax node) { State.IncreaseComplexityByNestingPlusOne(node.GoToKeyword); base.VisitGoToStatement(node); }
public override void VisitGoToStatement(GoToStatementSyntax node) { LogicalLineCount++; base.VisitGoToStatement(node); }
private GoTo TraverseGoTo(List<LabelStatement> labels, GoToStatementSyntax gtss) { GoTo gotoStm = new GoTo(); LabelSyntax lss = gtss.Label; string lblName = lss.LabelToken.ValueText; bool found = false; foreach(LabelStatement lblStm in labels){ if (lblStm.Name == lblName) { gotoStm.GoToLabel = lblStm; found = true; break; } } if (!found) { gotoStm.GoToLabel = new LabelStatement() { Name = lblName }; } return gotoStm; }