+2
-2
Package.swift
+2
-2
Package.swift
······
+1
Sources/PterodactylBuild/Keys/Blob/ParseDocument.swift
+1
Sources/PterodactylBuild/Keys/Blob/ParseDocument.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()
Sources/PterodactylLanguageServer/LLBDeclFileTree+Singleton.swift
Sources/PterodactylLanguageServer/Archive/LLBDeclFileTree+Singleton.swift
Sources/PterodactylLanguageServer/LLBDeclFileTree+Singleton.swift
Sources/PterodactylLanguageServer/Archive/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
······
+3
-7
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryBlock.swift
+3
-7
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryBlock.swift
···-parser.expect(kind: .keyword(.where), metadata: TokenMetadata(semanticTokenType: .keyword), recovery: recovery.union([.blockBegin]))+parser.expect(kind: .keyword(.where), metadata: TokenMetadata(semanticTokenType: .keyword), recovery: recovery.union([.keyword(.theory), .blockComment(terminated: true), .lineComment]))
+1
-1
Sources/PterodactylSyntax/LineMap.swift
+1
-1
Sources/PterodactylSyntax/LineMap.swift
+1
-1
Sources/PterodactylSyntax/Parser.swift
+1
-1
Sources/PterodactylSyntax/Parser.swift
+22
Sources/PterodactylSyntax/SemanticToken.swift
+22
Sources/PterodactylSyntax/SemanticToken.swift
···
+1
-1
Sources/PterodactylSyntax/SyntaxCursor.swift
+1
-1
Sources/PterodactylSyntax/SyntaxCursor.swift
···
+1
Sources/PterodactylSyntax/Types.swift
+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)