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
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.