CommentLinesVisitor

public final class CommentLinesVisitor : SyntaxVisitor

Visitor to find lines that contain only comments.

  • Lines that contain actual code (not comments).

    Declaration

    Swift

    public private(set) var linesWithCode: Set<Int> { get }
  • Lines that contain only comments (and whitespace).

    Declaration

    Swift

    public var commentOnlyLines: Set<Int> { get }
  • Initializer.

    Declaration

    Swift

    public init(locationConverter: SourceLocationConverter)

    Parameters

    locationConverter

    The location converter to use for mapping positions to line numbers.

  • Declaration

    Swift

    override public func visit(_ token: TokenSyntax) -> SyntaxVisitorContinueKind