mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
[PR #453] [MERGED] Switch to adapter pattern #561
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/453
Author: @bioball
Created: 4/25/2024
Status: ✅ Merged
Merged: 4/26/2024
Merged by: @stackoverflow
Base:
lsp-setup← Head:lsp-setup📝 Commits (2)
ca34809Switch to adapter pattern7644913wip📊 Changes
28 files changed (+1571 additions, -1858 deletions)
View changed files
📝
pkl-lsp/src/main/kotlin/org/pkl/lsp/Builder.kt(+39 -18)📝
pkl-lsp/src/main/kotlin/org/pkl/lsp/ErrorMessages.kt(+18 -2)📝
pkl-lsp/src/main/kotlin/org/pkl/lsp/LSPUtil.kt(+8 -4)📝
pkl-lsp/src/main/kotlin/org/pkl/lsp/PklLSPServer.kt(+3 -3)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/analyzers/Analyzer.kt(+43 -0)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/analyzers/ModifierAnalyzer.kt(+121 -0)📝
pkl-lsp/src/main/kotlin/org/pkl/lsp/analyzers/PklDiagnostic.kt(+13 -10)📝
pkl-lsp/src/main/kotlin/org/pkl/lsp/analyzers/StringLiteralAnalyzer.kt(+6 -10)📝
pkl-lsp/src/main/kotlin/org/pkl/lsp/analyzers/SyntaxAnalyzer.kt(+8 -3)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/Basic.kt(+34 -0)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/Expr.kt(+155 -0)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/Member.kt(+96 -0)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/ModuleOrClass.kt(+132 -0)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/Node.kt(+421 -0)📝
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/Span.kt(+1 -1)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/Terminal.kt(+145 -0)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/TokenType.kt(+135 -0)➕
pkl-lsp/src/main/kotlin/org/pkl/lsp/ast/Type.kt(+54 -0)➖
pkl-lsp/src/main/kotlin/org/pkl/lsp/cst/CstBuilder.kt(+0 -1088)➖
pkl-lsp/src/main/kotlin/org/pkl/lsp/cst/DocComment.kt(+0 -18)...and 8 more files
📄 Description
This switches the LSP implementation to use the adapter pattern, deferring as much as possible to the ANTLR-generated classes.
It also gets rid of
CstBuilder, instead moving diagnostic handling to the analyzers.It's not complete but provides a skeleton to be filled in.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.