+2
-2
Package.swift
+2
-2
Package.swift
······
+8
-5
Sources/PterodactylBuild/Keys/Blob/GetLineMap.swift
+8
-5
Sources/PterodactylBuild/Keys/Blob/GetLineMap.swift
···
+14
-10
Sources/PterodactylBuild/Keys/Blob/ParseDocument.swift
+14
-10
Sources/PterodactylBuild/Keys/Blob/ParseDocument.swift
···+public static let versionDependencies: [any FXVersioning.Type] = [ReadContents.self, Tokenise.self]
+17
Sources/PterodactylLanguageServer/Archive/LLBDeclFileTree+Singleton.swift
+17
Sources/PterodactylLanguageServer/Archive/LLBDeclFileTree+Singleton.swift
···
+40
Sources/PterodactylLanguageServer/Archive/SourceTreeManager.swift
+40
Sources/PterodactylLanguageServer/Archive/SourceTreeManager.swift
···+// init(buildEngine: FXEngine, casClient: LLBCASFSClient, casContext: TSCUtility.Context, sourceTree: LLBCASFileTree? = nil) async throws {+// let singletonTree: LLBCASFileTree = try await casClient.storeDir(singletonDeclTree, casContext).get()+// self.sourceTree = try await sourceTree.merge(with: singletonTree, in: casClient.db, casContext).get()+// guard let (id, _) = try await sourceTree.lookup(path: path, in: casClient.db, casContext).get() else { return nil }+// return try await buildEngine.build(key: Keys.Blob.ReadContents(blobId: id), casContext).get()
+44
-27
Sources/PterodactylLanguageServer/EventHandler.swift
+44
-27
Sources/PterodactylLanguageServer/EventHandler.swift
·········self.buildEngine = FXEngine(group: group, db: db, functionCache: functionCache, executor: executor)-self.sourceTreeManager = try await SourceTreeManager(buildEngine: buildEngine, casClient: casClient, casContext: casContext)+if let stored = storedBlobs[uri], let version, let storedVersion = stored.version, storedVersion >= version {+let blobId: LLBDataID = try await casClient.store(LLBByteBuffer(string: text), casContext).get()+let lineMap = try await buildEngine.build(key: Keys.Blob.GetLineMap(blobId: blobId), casContext).get()+let parseResult = try await buildEngine.build(key: Keys.Blob.ParseDocument(blobId: blobId), casContext).get()+let publishParams = PublishDiagnosticsParams(uri: uri, version: version, diagnostics: diagnostics)······-// try await publishDiagnostics(uri: params.textDocument.uri, version: params.textDocument.version)+let blobId: LLBDataID = try await storeBlob(text: text, uri: params.textDocument.uri, version: params.textDocument.version)+try await publishLiveDiagnostics(blobId: blobId, uri: params.textDocument.uri, version: params.textDocument.version)-// await bufferManager.setBufferText(key: params.textDocument.uri, text: params.textDocument.text)-try await publishDiagnostics(uri: params.textDocument.uri, version: params.textDocument.version)+let blobId: LLBDataID = try await storeBlob(text: text, uri: params.textDocument.uri, version: params.textDocument.version)+try await publishLiveDiagnostics(blobId: blobId, uri: params.textDocument.uri, version: params.textDocument.version)func semanticTokensFull(id: JSONId, params: SemanticTokensParams) async -> Response<SemanticTokensResponse> {-// guard let document = await bufferManager.documentForBuffer(key: params.textDocument.uri) else { return .success(nil) }+let lineMap = try await buildEngine.build(key: Keys.Blob.GetLineMap(blobId: storedBlob.blobId), casContext).get()+let parseResult = try await buildEngine.build(key: Keys.Blob.ParseDocument(blobId: storedBlob.blobId), casContext).get()+return .success(SemanticTokensResponse(SemanticTokens(resultId: nil, tokens: cursor.semanticTokens)))func foldingRange(id: JSONId, params: FoldingRangeParams) async -> Response<FoldingRangeResponse> {-// guard let document = await bufferManager.documentForBuffer(key: params.textDocument.uri) else { return .success(nil) }+let lineMap = try await buildEngine.build(key: Keys.Blob.GetLineMap(blobId: storedBlob.blobId), casContext).get()+let parseResult = try await buildEngine.build(key: Keys.Blob.ParseDocument(blobId: storedBlob.blobId), casContext).get()
-17
Sources/PterodactylLanguageServer/LLBDeclFileTree+Singleton.swift
-17
Sources/PterodactylLanguageServer/LLBDeclFileTree+Singleton.swift
···
+54
Sources/PterodactylLanguageServer/PterodactylLanguageServer.swift
+54
Sources/PterodactylLanguageServer/PterodactylLanguageServer.swift
···
-39
Sources/PterodactylLanguageServer/SourceTreeManager.swift
-39
Sources/PterodactylLanguageServer/SourceTreeManager.swift
···-init(buildEngine: FXEngine, casClient: LLBCASFSClient, casContext: TSCUtility.Context, sourceTree: LLBCASFileTree? = nil) async throws {-let singletonTree: LLBCASFileTree = try await casClient.storeDir(singletonDeclTree, casContext).get()-self.sourceTree = try await sourceTree.merge(with: singletonTree, in: casClient.db, casContext).get()-guard let (id, _) = try await sourceTree.lookup(path: path, in: casClient.db, casContext).get() else { return nil }
+1
-1
Sources/PterodactylSyntax/BlockLayoutProcessor.swift
+1
-1
Sources/PterodactylSyntax/BlockLayoutProcessor.swift
···-if !firstTokenInBlock && indentStack.count > 1 && locatedToken.location.startColumn == indentStack.last! {+if !firstTokenInBlock && indentStack.count > 1 && locatedToken.token.kind.isVisible && locatedToken.location.startColumn == indentStack.last! {
+22
-5
Sources/PterodactylSyntax/Diagnostic.swift
+22
-5
Sources/PterodactylSyntax/Diagnostic.swift
······
+7
-7
Sources/PterodactylSyntax/Grammar/Document/Import.swift
+7
-7
Sources/PterodactylSyntax/Grammar/Document/Import.swift
···+parser.expect(kind: .identifier, metadata: TokenMetadata(semanticTokenType: .namespace), recovery: recovery)···+parser.expect(kind: .keyword(.import), metadata: TokenMetadata(semanticTokenType: .keyword), recovery: recovery)
+3
-3
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Lhs.swift
+3
-3
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Lhs.swift
···+parser.expect(kind: .identifier, metadata: TokenMetadata(semanticTokenType: .method), recovery: recovery)
+3
-3
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Rhs.swift
+3
-3
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Rhs.swift
···+parser.expect(kind: .identifier, metadata: TokenMetadata(semanticTokenType: .method), recovery: recovery)
+6
-5
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration.swift
+6
-5
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration.swift
·········
+5
-13
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryBlock.swift
+5
-13
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryBlock.swift
···+parser.expect(kind: .keyword(.where), metadata: TokenMetadata(semanticTokenType: .keyword), recovery: recovery.union([.keyword(.theory), .blockComment(terminated: true), .lineComment]))
+2
-2
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryName.swift
+2
-2
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryName.swift
···
+6
-6
Sources/PterodactylSyntax/Grammar/Document/Theory.swift
+6
-6
Sources/PterodactylSyntax/Grammar/Document/Theory.swift
···+parser.expect(kind: .keyword(.theory), metadata: TokenMetadata(semanticTokenType: .keyword), recovery: recovery)
+5
-5
Sources/PterodactylSyntax/Grammar/Document.swift
+5
-5
Sources/PterodactylSyntax/Grammar/Document.swift
···parser.advance(error: "Expected to see either an import or a theory declaration, but instead got \(parser.currentToken.kind): \(parser.currentToken.text)")
+17
-17
Sources/PterodactylSyntax/Grammar.swift
+17
-17
Sources/PterodactylSyntax/Grammar.swift
···/// Indicates whether the current parser state is consistent with the grammatical production starting here. When a given grammatical element is optional, this can be used to avoid backtracking. This is a *precondition* for parsing.-/// Parse the grammatical production, assuming the precondition indicated by ``before(_:)``. This function should not be called outside this module (instead, use ``parse(_:)`` and ``tryParse(_:)``.+/// Parse the grammatical production, assuming the precondition indicated by ``precondition(_:)``. This function should not be called outside this module (instead, use ``parse(_:recovery:)`` and ``tryParse(_:recovery:)``.···
+1
-1
Sources/PterodactylSyntax/LineMap.swift
+1
-1
Sources/PterodactylSyntax/LineMap.swift
+61
-83
Sources/PterodactylSyntax/Parser.swift
+61
-83
Sources/PterodactylSyntax/Parser.swift
·········-public mutating func close(mark: MarkOpened, kind: SyntaxTreeKind, metadata: SyntaxTreeMetadata?) {-public mutating func eat(kindSatisfying predicate: (TokenKind) -> Bool, metadata: TokenMetadata?) -> Bool {-public mutating func expect(kind: TokenKind, metadata: TokenMetadata?, error: String? = nil) {+mutating func recoverUntil(_ anchors: Set<TokenKind>, expected: TokenKind, error: String? = nil) {+public mutating func expect(kind: TokenKind, metadata: TokenMetadata?, recovery: Set<TokenKind>, error: String? = nil) {···
+22
Sources/PterodactylSyntax/SemanticToken.swift
+22
Sources/PterodactylSyntax/SemanticToken.swift
···
+1
-1
Sources/PterodactylSyntax/SyntaxCursor.swift
+1
-1
Sources/PterodactylSyntax/SyntaxCursor.swift
···
+1
-1
Sources/PterodactylSyntax/SyntaxTree.swift
+1
-1
Sources/PterodactylSyntax/SyntaxTree.swift
···/// A mutable version of ``SyntaxTree`` that does not keep track of textual length, for use when constructing trees.
+70
Sources/PterodactylSyntax/SyntaxTreeBuilder.swift
+70
Sources/PterodactylSyntax/SyntaxTreeBuilder.swift
···+public mutating func close(mark: MarkOpened, kind: SyntaxTreeKind, metadata: SyntaxTreeMetadata?) {
+1
-1
Sources/PterodactylSyntax/Token.swift
+1
-1
Sources/PterodactylSyntax/Token.swift
+2
-1
Sources/PterodactylSyntax/Types.swift
+2
-1
Sources/PterodactylSyntax/Types.swift
······
+37
Tests/PterodactylBuildTests/Test.swift
+37
Tests/PterodactylBuildTests/Test.swift
···+.keyword(.theory), .whitespace, .identifier, .whitespace, .keyword(.where), .blockBegin, .newline, .whitespace, .blockSep, .identifier, .whitespace,+.whitespace, .identifier, .newline, .whitespace, .blockSep, .identifier, .whitespace, .punctuation(.colon), .whitespace, .identifier, .blockEnd, .eof
+4
-17
Tests/PterodactylLanguageServerTests/Test.swift
+4
-17
Tests/PterodactylLanguageServerTests/Test.swift
······-let manager = try await SourceTreeManager(buildEngine: engine, casClient: client, casContext: context)