This project is my study for language server protocol (LSP) server implementation.
Curage-lang itself is tiny, no-interesting language. I am implementing a LSP server for the language. It has some features, such as syntax error reporting, symbol renaming, etc.
lsp
: The language server implementation and VSCode extension.src/extension.ts
: Entry point of the VSCode extension.src/server.ts
: Entry point of the server.
Curage-lang's syntax is very simple. The following describes the syntax in PEG-like notation.
expression = int / name
statement = "let" name "be" expression "\n"
program = statement*
Legends:
A*
means a sequence of A or empty,A+
means a sequence of A at least one,A / B
means A or B.
Example:
let x be 1
let y be x
- v0.1.0 (diff): Minimum implementation of LSP server
- v0.2.0 (diff): Sample of error reporting
- v0.3.0 (diff): Syntactical analysis and syntax error reporting
- v0.4.0 (diff): Semantic analysis, hit-testing and symbol highlighting
- v0.5.0 (diff): Symbol renaming
Renaming symbols don't need screenshot.
let x be 1
↓ (Rename x
to new_x
)
let new_x be 1
I'm writing a series of articles to explain source codes in this repository. Written in Japanese language.
- First chapter: LSP学習記 #1