Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// This file provides the Diagnostic, Note, and FixIt types.
//===----------------------------------------------------------------------===//

import SwiftSyntax

/// A FixIt represents a change to source code in order to "correct" a
/// diagnostic.
public enum FixIt: Codable, CustomDebugStringConvertible {
Expand Down Expand Up @@ -108,7 +106,7 @@ public struct Note: Codable {
public let fixIts: [FixIt]

/// Constructs a new Note from the constituent parts.
internal init(message: Diagnostic.Message, location: SourceLocation?,
public init(message: Diagnostic.Message, location: SourceLocation?,
highlights: [SourceRange], fixIts: [FixIt]) {
precondition(message.severity == .note,
"notes can only have the `note` severity")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//===----------------------------------------------------------------------===//

import Foundation
import SwiftSyntax

/// The DiagnosticEngine allows Swift tools to emit diagnostics.
public class DiagnosticEngine {
Expand Down Expand Up @@ -56,7 +55,7 @@ public class DiagnosticEngine {
}
}

internal var needsLineColumn: Bool {
public var needsLineColumn: Bool {
// Check if any consumer is interested in line and column.
return consumers.first { $0.needsLineColumn } != nil
}
Expand All @@ -71,7 +70,7 @@ public class DiagnosticEngine {
}
}

internal func diagnose(_ diagnostic: Diagnostic) {
public func diagnose(_ diagnostic: Diagnostic) {
diagnostics.append(diagnostic)
for consumer in consumers {
consumer.handle(diagnostic)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//===----------------------------------------------------------------------===//

import Foundation
import SwiftSyntax

public final class JSONDiagnosticConsumer: DiagnosticConsumer {
/// Enumerates the possible places this consumer might output diagnostics.
Expand Down
5 changes: 5 additions & 0 deletions utils/group.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
],
"Parse": [
"IncrementalParseTransition.swift",
"Diagnostic.swift",
"DiagnosticEngine.swift",
"DiagnosticConsumer.swift",
"JSONDiagnosticConsumer.swift",
"PrintingDiagnosticConsumer.swift"
],
"Internal": [
"_SyntaxParserInterop.swift",
Expand Down