Skip to content

Fix swift-syntax API incompatible changes #895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
5 changes: 2 additions & 3 deletions Sources/SourceKitLSP/Swift/SyntaxTreeManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ actor SyntaxTreeManager {
/// A task that parses a SwiftSyntax tree from a source file, producing both
/// the syntax tree and the lookahead ranges that are needed for a subsequent
/// incremental parse.
private typealias SyntaxTreeComputation = Task<(tree: SourceFileSyntax, lookaheadRanges: LookaheadRanges), Never>
private typealias SyntaxTreeComputation = Task<IncrementalParseResult, Never>

/// The tasks that compute syntax trees.
///
Expand Down Expand Up @@ -101,9 +101,8 @@ actor SyntaxTreeManager {
// a new, full, from-scratch parse.
let oldParseResult = await preEditTreeComputation.value
let parseTransition = IncrementalParseTransition(
previousTree: oldParseResult.tree,
previousIncrementalParseResult: oldParseResult,
edits: edits,
lookaheadRanges: oldParseResult.lookaheadRanges,
reusedNodeCallback: reusedNodeCallback
)
return Parser.parseIncrementally(source: postEditSnapshot.text, parseTransition: parseTransition)
Expand Down