+2
-35
Package.swift
+2
-35
Package.swift
······
+9
-9
Sources/PterodactylBuild/BuildContext.swift
+9
-9
Sources/PterodactylBuild/BuildContext.swift
···-public func computeValue(_ fi: FXFunctionInterface<Self>, _ ctx: Context) async throws -> ValueType {-public static func load<X: FXKey>(id: LLBDataID, in ctx: BuildContext<X>) async throws -> LLBCASFileTree {+static func load<X: FXKey>(id: LLBDataID, in ctx: BuildContext<X>) async throws -> LLBCASFileTree {-public func remove<X: FXKey>(path: AbsolutePath, in ctx: BuildContext<X>) async throws -> LLBCASFileTree {+func remove<X: FXKey>(path: AbsolutePath, in ctx: BuildContext<X>) async throws -> LLBCASFileTree {-public func traverse<X: FXKey>(root: AbsolutePath, in ctx: BuildContext<X>, _ callback: (AbsolutePath, LLBDataID, LLBDirectoryEntry) async throws -> Void) async throws {+func traverse<X: FXKey>(root: AbsolutePath, in ctx: BuildContext<X>, _ callback: (AbsolutePath, LLBDataID, LLBDirectoryEntry) async throws -> Void) async throws {
-16
Sources/PterodactylBuild/FXValue+Conformances.swift
-16
Sources/PterodactylBuild/FXValue+Conformances.swift
···
+34
Sources/PterodactylBuild/Keys/AnalyseImports.swift
+34
Sources/PterodactylBuild/Keys/AnalyseImports.swift
···
-25
Sources/PterodactylBuild/Keys/Blob/GetLineMap.swift
-25
Sources/PterodactylBuild/Keys/Blob/GetLineMap.swift
···
-32
Sources/PterodactylBuild/Keys/Blob/ParseDocument.swift
-32
Sources/PterodactylBuild/Keys/Blob/ParseDocument.swift
···-public static let versionDependencies: [any FXVersioning.Type] = [ReadContents.self, Tokenise.self]
-31
Sources/PterodactylBuild/Keys/Blob/ParseImports.swift
-31
Sources/PterodactylBuild/Keys/Blob/ParseImports.swift
···
-7
Sources/PterodactylBuild/Keys/Blob/README.md
-7
Sources/PterodactylBuild/Keys/Blob/README.md
···-Certain operations do not require knowledge of the entire source tree, only a specific blob inside the source tree. These include import analysis, tokenisation, line maps, parsing, etc.
-25
Sources/PterodactylBuild/Keys/Blob/ReadContents.swift
-25
Sources/PterodactylBuild/Keys/Blob/ReadContents.swift
···
-24
Sources/PterodactylBuild/Keys/Blob/Tokenise.swift
-24
Sources/PterodactylBuild/Keys/Blob/Tokenise.swift
···
+33
Sources/PterodactylBuild/Keys/DependencyGraphOfSourceTree.swift
+33
Sources/PterodactylBuild/Keys/DependencyGraphOfSourceTree.swift
···+static let versionDependencies: [any FXVersioning.Type] = [Keys.UnitMapOfSourceTree.self, Keys.AnalyseImports.self]
+7
Sources/PterodactylBuild/Keys/Keys.swift
+7
Sources/PterodactylBuild/Keys/Keys.swift
+35
Sources/PterodactylBuild/Keys/NarrowSourceTree.swift
+35
Sources/PterodactylBuild/Keys/NarrowSourceTree.swift
···+static let versionDependencies: [any FXVersioning.Type] = [TransitiveDependencies.self, UnitMapOfSourceTree.self]+let dependencies = try await ctx.request(TransitiveDependencies(sourceTreeId: sourceTreeId, unitName: unitName)).dependencies
+32
Sources/PterodactylBuild/Keys/SourceCode.swift
+32
Sources/PterodactylBuild/Keys/SourceCode.swift
···
-22
Sources/PterodactylBuild/Keys/SourceTree/GetDependencies.swift
-22
Sources/PterodactylBuild/Keys/SourceTree/GetDependencies.swift
···-static let versionDependencies: [any FXVersioning.Type] = [Keys.SourceTree.GetDependencyGraph.self]-let graph = try await ctx.request(Keys.SourceTree.GetDependencyGraph(sourceTreeId: sourceTreeId))
-31
Sources/PterodactylBuild/Keys/SourceTree/GetDependencyGraph.swift
-31
Sources/PterodactylBuild/Keys/SourceTree/GetDependencyGraph.swift
···-static let versionDependencies: [any FXVersioning.Type] = [Keys.SourceTree.GetUnitMap.self, Keys.Blob.ParseImports.self]
-25
Sources/PterodactylBuild/Keys/SourceTree/GetUnitMap.swift
-25
Sources/PterodactylBuild/Keys/SourceTree/GetUnitMap.swift
···
-32
Sources/PterodactylBuild/Keys/SourceTree/NarrowToUnit.swift
-32
Sources/PterodactylBuild/Keys/SourceTree/NarrowToUnit.swift
···-static let versionDependencies: [any FXVersioning.Type] = [GetDependencies.self, GetUnitMap.self]-let dependencies = try await ctx.request(GetDependencies(sourceTreeId: sourceTreeId, unitName: unitName))
+25
Sources/PterodactylBuild/Keys/TransitiveDependencies.swift
+25
Sources/PterodactylBuild/Keys/TransitiveDependencies.swift
···+static let versionDependencies: [any FXVersioning.Type] = [Keys.DependencyGraphOfSourceTree.self]+let graph = try await ctx.request(Keys.DependencyGraphOfSourceTree(sourceTreeId: sourceTreeId))
+25
Sources/PterodactylBuild/Keys/UnitMapOfSourceTree.swift
+25
Sources/PterodactylBuild/Keys/UnitMapOfSourceTree.swift
···
-10
Sources/PterodactylBuild/Keys.swift
-10
Sources/PterodactylBuild/Keys.swift
+5
-5
Sources/PterodactylBuild/Types/UnitName.swift
+5
-5
Sources/PterodactylBuild/Types/UnitName.swift
···
-19
Sources/PterodactylLanguageServer/AbsolutePath+URI.swift
-19
Sources/PterodactylLanguageServer/AbsolutePath+URI.swift
···
-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()
-269
Sources/PterodactylLanguageServer/EventHandler.swift
-269
Sources/PterodactylLanguageServer/EventHandler.swift
···-self.buildEngine = FXEngine(group: group, db: db, functionCache: functionCache, executor: executor)-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)-SemanticTokensLegend(tokenTypes: SemanticTokenTypes.allStrings, tokenModifiers: SemanticTokenModifiers.allStrings)-SemanticTokensOptions(legend: semanticTokensLegend, full: .optionB(SemanticTokensClientCapabilities.Requests.Full(delta: false)))-func initialize(id: JSONId, params: InitializeParams) async -> Response<InitializationResponse> {-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)-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> {-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> {-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()-func diagnostics(id: JSONId, params: DocumentDiagnosticParams) async -> Response<DocumentDiagnosticReport> {-func workspaceExecuteCommand(id: JSONId, params: ExecuteCommandParams) async -> Response<LSPAny?> { .success(nil) }-func workspaceWillCreateFiles(id: JSONId, params: CreateFilesParams) async -> Response<WorkspaceEdit?> { .success(nil) }-func workspaceWillRenameFiles(id: JSONId, params: RenameFilesParams) async -> Response<WorkspaceEdit?> { .success(nil) }-func workspaceWillDeleteFiles(id: JSONId, params: DeleteFilesParams) async -> Response<WorkspaceEdit?> { .success(nil) }-func workspaceSymbol(id: JSONId, params: WorkspaceSymbolParams) async -> Response<WorkspaceSymbolResponse> { .success(nil) }-// func workspaceSymbolResolve(id: JSONId, params: WorkspaceSymbol) async -> Response<WorkspaceSymbol> { .success(nil) }-func textDocumentWillSaveWaitUntil(id: JSONId, params: WillSaveTextDocumentParams) async -> Response<[TextEdit]?> { .success(nil) }-// func completionItemResolve(id: JSONId, params: CompletionItem) async -> Response<CompletionItem> { .success(nil) }-func hover(id: JSONId, params: TextDocumentPositionParams) async -> Response<HoverResponse> { .success(nil) }-func signatureHelp(id: JSONId, params: TextDocumentPositionParams) async -> Response<SignatureHelpResponse> { .success(nil) }-func declaration(id: JSONId, params: TextDocumentPositionParams) async -> Response<DeclarationResponse> { .success(nil) }-func definition(id: JSONId, params: TextDocumentPositionParams) async -> Response<DefinitionResponse> { .success(nil) }-func typeDefinition(id: JSONId, params: TextDocumentPositionParams) async -> Response<TypeDefinitionResponse> { .success(nil) }-func implementation(id: JSONId, params: TextDocumentPositionParams) async -> Response<ImplementationResponse> { .success(nil) }-func documentHighlight(id: JSONId, params: DocumentHighlightParams) async -> Response<DocumentHighlightResponse> { .success(nil) }-func documentSymbol(id: JSONId, params: DocumentSymbolParams) async -> Response<DocumentSymbolResponse> { .success(nil) }-func codeAction(id: JSONId, params: CodeActionParams) async -> Response<CodeActionResponse> { .success(nil) }-// func codeActionResolve(id: JSONId, params: CodeAction) async -> Response<CodeAction> { .success(nil) }-func codeLens(id: JSONId, params: CodeLensParams) async -> Response<CodeLensResponse> { .success(nil) }-// func codeLensResolve(id: JSONId, params: CodeLens) async -> Response<CodeLens> { .success(nil) }-func selectionRange(id: JSONId, params: SelectionRangeParams) async -> Response<SelectionRangeResponse> { .success(nil) }-func linkedEditingRange(id: JSONId, params: LinkedEditingRangeParams) async -> Response<LinkedEditingRangeResponse> { .success(nil) }-func prepareCallHierarchy(id: JSONId, params: CallHierarchyPrepareParams) async -> Response<CallHierarchyPrepareResponse> { .success(nil) }-func prepareRename(id: JSONId, params: PrepareRenameParams) async -> Response<PrepareRenameResponse> { .success(nil) }-func prepareTypeHeirarchy(id: JSONId, params: TypeHierarchyPrepareParams) async -> Response<PrepareTypeHeirarchyResponse> { .success(nil) }-func rename(id: JSONId, params: RenameParams) async -> Response<RenameResponse> { .success(nil) }-func inlayHint(id: JSONId, params: InlayHintParams) async -> Response<InlayHintResponse> { .success(nil) }-func inlayHintResolve(id: JSONId, params: InlayHint) async -> Response<InlayHintResponse> { .success(nil) }-func documentLink(id: JSONId, params: DocumentLinkParams) async -> Response<DocumentLinkResponse> { .success(nil) }-// func documentLinkResolve(id: JSONId, params: DocumentLink) async -> Response<DocumentLink> { .success(nil) }-// func documentColor(id: JSONId, params: DocumentColorParams) async -> Response<DocumentColorResponse> { .success(nil) }-// func colorPresentation(id: JSONId, params: ColorPresentationParams) async -> Response<ColorPresentationResponse> { .success(nil) }-func formatting(id: JSONId, params: DocumentFormattingParams) async -> Response<FormattingResult> { .success(nil) }-func rangeFormatting(id: JSONId, params: DocumentRangeFormattingParams) async -> Response<FormattingResult> { .success(nil) }-func onTypeFormatting(id: JSONId, params: DocumentOnTypeFormattingParams) async -> Response<FormattingResult> { .success(nil) }-func references(id: JSONId, params: ReferenceParams) async -> Response<ReferenceResponse> { .success(nil) }-func moniker(id: JSONId, params: MonikerParams) async -> Response<MonikerResponse> { .success(nil) }-func semanticTokensFullDelta(id: JSONId, params: SemanticTokensDeltaParams) async -> Response<SemanticTokensDeltaResponse> { .success(nil) }-func semanticTokensRange(id: JSONId, params: SemanticTokensRangeParams) async -> Response<SemanticTokensResponse> { .success(nil) }-func callHierarchyIncomingCalls(id: JSONId, params: CallHierarchyIncomingCallsParams) async -> Response<CallHierarchyIncomingCallsResponse> { .success(nil) }-func callHierarchyOutgoingCalls(id: JSONId, params: CallHierarchyOutgoingCallsParams) async -> Response<CallHierarchyOutgoingCallsResponse> { .success(nil) }-func custom(id: JSONId, method: String, params: LSPAny) async -> Response<LSPAny> { .success(nil) }
-63
Sources/PterodactylLanguageServer/Logger.swift
-63
Sources/PterodactylLanguageServer/Logger.swift
···
-54
Sources/PterodactylLanguageServer/PterodactylLanguageServer.swift
-54
Sources/PterodactylLanguageServer/PterodactylLanguageServer.swift
···
-100
Sources/PterodactylSyntax/BlockLayoutProcessor.swift
-100
Sources/PterodactylSyntax/BlockLayoutProcessor.swift
···-let startColumn = if lines.count > 1 { lines.last!.utf16.count } else { lines.last?.utf16.count ?? location.startColumn }-if !firstTokenInBlock && indentStack.count > 1 && locatedToken.token.kind.isVisible && locatedToken.location.startColumn == indentStack.last! {-if let nextToken = locatedTokens[index...].first(where: { $0.location.startLine > locatedToken.location.startLine && $0.token.kind.canDetermineLayoutColumn }) {
+25
Sources/PterodactylSyntax/Cursor.swift
+25
Sources/PterodactylSyntax/Cursor.swift
···
-40
Sources/PterodactylSyntax/Diagnostic.swift
-40
Sources/PterodactylSyntax/Diagnostic.swift
···
-62
Sources/PterodactylSyntax/FoldingRanges.swift
-62
Sources/PterodactylSyntax/FoldingRanges.swift
···-if let foldingRangeKind = node.tree?.metadata?.delimitedFoldingRangeKind, let visibleUtf16Range {-let foldingRange = FoldingRange(startLine: startLocation.line, endLine: endLocation.line, kind: foldingRangeKind)
-46
Sources/PterodactylSyntax/Grammar/Document/Import.swift
-46
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)
-21
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Lhs.swift
-21
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Lhs.swift
···-parser.expect(kind: .identifier, metadata: TokenMetadata(semanticTokenType: .method), recovery: recovery)
-21
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Rhs.swift
-21
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Rhs.swift
···-parser.expect(kind: .identifier, metadata: TokenMetadata(semanticTokenType: .method), recovery: recovery)
-53
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration.swift
-53
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration.swift
···-if parser.eat(kind: .punctuation(cell.key), metadata: TokenMetadata(semanticTokenType: .operator)) {
-38
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryBlock.swift
-38
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]))
-23
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryName.swift
-23
Sources/PterodactylSyntax/Grammar/Document/Theory/TheoryName.swift
···
-33
Sources/PterodactylSyntax/Grammar/Document/Theory.swift
-33
Sources/PterodactylSyntax/Grammar/Document/Theory.swift
···-parser.expect(kind: .keyword(.theory), metadata: TokenMetadata(semanticTokenType: .keyword), recovery: recovery)
-51
Sources/PterodactylSyntax/Grammar/Document.swift
-51
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)")
-42
Sources/PterodactylSyntax/Grammar.swift
-42
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 ``precondition(_:)``. This function should not be called outside this module (instead, use ``parse(_:recovery:)`` and ``tryParse(_:recovery:)``.
-42
Sources/PterodactylSyntax/ImportParser.swift
-42
Sources/PterodactylSyntax/ImportParser.swift
···
-138
Sources/PterodactylSyntax/Lexer.swift
-138
Sources/PterodactylSyntax/Lexer.swift
···-/// This tokenises a string, without handling block layout at all. The tokens produced here should be fed into the ``BlockLayoutProcessor``.
-32
Sources/PterodactylSyntax/LineMap.swift
-32
Sources/PterodactylSyntax/LineMap.swift
···
-166
Sources/PterodactylSyntax/Parser.swift
-166
Sources/PterodactylSyntax/Parser.swift
···-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) {
-91
Sources/PterodactylSyntax/SemanticToken.swift
-91
Sources/PterodactylSyntax/SemanticToken.swift
···
-51
Sources/PterodactylSyntax/SyntaxCursor.swift
-51
Sources/PterodactylSyntax/SyntaxCursor.swift
···-/// This is a โred treeโ in the sense of Roslyn. In essence it instruments syntax trees with non-relative location information.
+8
-36
Sources/PterodactylSyntax/SyntaxTree.swift
+8
-36
Sources/PterodactylSyntax/SyntaxTree.swift
···-public init(kind: SyntaxTreeKind, metadata: SyntaxTreeMetadata? = nil, children: [SyntaxTree.Child]) {+public init(kind: SyntaxTreeKind, metadata: SyntaxTreeMetadata?, children: [SyntaxTree.Child]) {···-/// 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?) {
-22
Sources/PterodactylSyntax/SyntaxView.swift
-22
Sources/PterodactylSyntax/SyntaxView.swift
···-/// An abstract syntax view around a ``SyntaxCursor``. This is to be populated by extensions targetting specific `G`.
+2
-2
Sources/PterodactylSyntax/Token.swift
+2
-2
Sources/PterodactylSyntax/Token.swift
···
+6
-82
Sources/PterodactylSyntax/Types.swift
+6
-82
Sources/PterodactylSyntax/Types.swift
···
+24
Sources/PterodactylSyntax/Utf16Position.swift
+24
Sources/PterodactylSyntax/Utf16Position.swift
···
+5
-42
Tests/PterodactylBuildTests/Test.swift
+5
-42
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···-let dependencyGraph = try await engine.build(key: Keys.SourceTree.GetDependencyGraph(sourceTreeId: treeID), ctx).get()+let dependencyGraph = try await engine.build(key: Keys.DependencyGraphOfSourceTree(sourceTreeId: treeID), ctx).get()···-let dependenciesOfBaz = try await engine.build(key: Keys.SourceTree.GetDependencies(sourceTreeId: treeID, unitName: baz), ctx).get()+let dependenciesOfBaz = try await engine.build(key: Keys.TransitiveDependencies(sourceTreeId: treeID, unitName: baz), ctx).get().dependencies
-36
Tests/PterodactylLanguageServerTests/Test.swift
-36
Tests/PterodactylLanguageServerTests/Test.swift
···
-4
license.sh
-4
license.sh