+1
.gitignore
+1
.gitignore
+26
-2
Package.swift
+26
-2
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 {-static func load<X: FXKey>(id: LLBDataID, in ctx: BuildContext<X>) async throws -> LLBCASFileTree {+public static func load<X: FXKey>(id: LLBDataID, in ctx: BuildContext<X>) async throws -> LLBCASFileTree {-func remove<X: FXKey>(path: AbsolutePath, in ctx: BuildContext<X>) async throws -> LLBCASFileTree {+public func remove<X: FXKey>(path: AbsolutePath, in ctx: BuildContext<X>) async throws -> LLBCASFileTree {-func traverse<X: FXKey>(root: AbsolutePath, in ctx: BuildContext<X>, _ callback: (AbsolutePath, LLBDataID, LLBDirectoryEntry) async throws -> Void) async throws {+public func traverse<X: FXKey>(root: AbsolutePath, in ctx: BuildContext<X>, _ callback: (AbsolutePath, LLBDataID, LLBDirectoryEntry) async throws -> Void) async throws {
+8
-5
Sources/PterodactylBuild/Keys/Blob/GetLineMap.swift
+8
-5
Sources/PterodactylBuild/Keys/Blob/GetLineMap.swift
···
+15
-8
Sources/PterodactylBuild/Keys/Blob/ParseDocument.swift
+15
-8
Sources/PterodactylBuild/Keys/Blob/ParseDocument.swift
···+public static let versionDependencies: [any FXVersioning.Type] = [ReadContents.self, Tokenise.self]
-35
Sources/PterodactylBuild/Keys/Blob/ParseImports.swift
-35
Sources/PterodactylBuild/Keys/Blob/ParseImports.swift
···
+6
Sources/PterodactylBuild/Keys/Blob/README.md
+6
Sources/PterodactylBuild/Keys/Blob/README.md
···
+8
-4
Sources/PterodactylBuild/Keys/Blob/ReadContents.swift
+8
-4
Sources/PterodactylBuild/Keys/Blob/ReadContents.swift
···
+2
-2
Sources/PterodactylBuild/Keys/SourceTree/GetUnitMap.swift
+2
-2
Sources/PterodactylBuild/Keys/SourceTree/GetUnitMap.swift
···
+3
-3
Sources/PterodactylBuild/Keys.swift
+3
-3
Sources/PterodactylBuild/Keys.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
···
+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! {
-53
Sources/PterodactylSyntax/Cursor.swift
-53
Sources/PterodactylSyntax/Cursor.swift
···
+26
-11
Sources/PterodactylSyntax/Diagnostic.swift
+26
-11
Sources/PterodactylSyntax/Diagnostic.swift
···
+4
-5
Sources/PterodactylSyntax/FoldingRanges.swift
+4
-5
Sources/PterodactylSyntax/FoldingRanges.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)
+13
-11
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Lhs.swift
+13
-11
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Lhs.swift
···+parser.expect(kind: .identifier, metadata: TokenMetadata(semanticTokenType: .method), recovery: recovery)
+13
-11
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Rhs.swift
+13
-11
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration/Rhs.swift
···+parser.expect(kind: .identifier, metadata: TokenMetadata(semanticTokenType: .method), recovery: recovery)
+8
-7
Sources/PterodactylSyntax/Grammar/Document/Theory/Declaration.swift
+8
-7
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)")
+23
-17
Sources/PterodactylSyntax/Grammar.swift
+23
-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 ``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
···
+1
Sources/PterodactylSyntax/Lexer.swift
+1
Sources/PterodactylSyntax/Lexer.swift
+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) {···
+23
-1
Sources/PterodactylSyntax/SemanticToken.swift
+23
-1
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.
+2
-1
Sources/PterodactylSyntax/SyntaxTree.swift
+2
-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?) {
+3
-2
Sources/PterodactylSyntax/SyntaxView.swift
+3
-2
Sources/PterodactylSyntax/SyntaxView.swift
···+/// An abstract syntax view around a ``SyntaxCursor``. This is to be populated by extensions targetting specific `G`.
+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
+36
Tests/PterodactylLanguageServerTests/Test.swift
+36
Tests/PterodactylLanguageServerTests/Test.swift
···