Skip to content

Commit

Permalink
Start the sals language server
Browse files Browse the repository at this point in the history
Already supports:
- Error squigglies
- Semantic tokens based on lexer token stream
- Go to definition

which already makes for a better syntax highlighting experience and IDE
features than anything what exists in VSCode today :^)

This commit also fixes many issues in spcasm, mostly: codegen tables,
source range coalescing, lexer indices.
  • Loading branch information
kleinesfilmroellchen committed Apr 5, 2023
1 parent 3eba07d commit 4672044
Show file tree
Hide file tree
Showing 24 changed files with 1,719 additions and 52 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ out.gif
tests/yoshi.brr
tests/yoshi-test-generated.wav
tests/test-output

node_modules
/sals/vscode/dist
30 changes: 25 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
},
"args": [
"examples/test.spcasm"
"tests/opcodes.s"
],
"cwd": "${workspaceFolder}"
},
Expand All @@ -26,10 +26,7 @@
"name": "Debug spcasm tests",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=spcasm",
"--package=spcasm"
"nextest"
],
"filter": {
"name": "spcasm",
Expand All @@ -38,6 +35,29 @@
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"name": "Test sals in extension host",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}/sals",
"${workspaceRoot}/tests/opcodes.s"
],
"outFiles": [
"${workspaceRoot}/sals/vscode/dist/**/*.js"
],
"env": {
"SERVER_PATH": "${workspaceRoot}/target/debug/sals"
}
},
{
"name": "Attach to sals server",
"request": "attach",
"type": "lldb",
"program": "${workspaceRoot}/target/debug/sals",
"pid": "${command:pickMyProcess}"
}
]
}
Loading

0 comments on commit 4672044

Please sign in to comment.