internal static void CollectClassifiedSpans( IEnumerable<SyntaxToken> tokens, TextSpan textSpan, List<ClassifiedSpan> result, CancellationToken cancellationToken) { var worker = new Worker(textSpan, result, cancellationToken); foreach (var tk in tokens) { worker.ClassifyToken(tk); } }
internal static void CollectClassifiedSpans(SyntaxNode node, TextSpan textSpan, List<ClassifiedSpan> result, CancellationToken cancellationToken) { var worker = new Worker(textSpan, result, cancellationToken); worker.ClassifyNode(node); }
public override void AddSyntacticClassifications(SyntaxTree syntaxTree, TextSpan textSpan, ArrayBuilder <ClassifiedSpan> result, CancellationToken cancellationToken) => Worker.CollectClassifiedSpans(syntaxTree.GetRoot(cancellationToken), textSpan, result, cancellationToken);
public override void AddSyntacticClassifications(SyntaxNode root, TextSpan textSpan, ArrayBuilder <ClassifiedSpan> result, CancellationToken cancellationToken) => Worker.CollectClassifiedSpans(root, textSpan, result, cancellationToken);