chore(ffi-linkage): post-stream polish — vscode keywords + vestigial param + extension metadata

Two post-stream follow-ups flagged in CHECKPOINT-EXTERN-EXPORT.md, plus a
reproducible vscode-extension packaging setup:

- parser: drop the vestigial `RuntimeClassPrefix.is_extern` field and
  `parseRuntimeClassDecl`'s `is_extern` param. Always false since the
  `#foreign` token was deleted; the postfix `extern`/`export` keyword is the
  sole reference-vs-define decider. No behavior change (644 corpus / 442 unit).
- vscode grammar: highlight `extern`/`export` as `storage.modifier.sx`.
- vscode packaging: declare `@vscode/vsce` as a devDep + add `package` /
  `vscode:prepublish` scripts so the vsix rebuilds reproducibly (was an
  ambient tool). Add repository/homepage/bugs (Gitea), icon (swipelab logo,
  256x256), galleryBanner, README with cover banner. Rebuilt the vsix.
This commit is contained in:
agra
2026-06-15 12:57:07 +03:00
parent c1ab2cbfc0
commit f3c9747f5a
9 changed files with 3878 additions and 18 deletions

25
editors/vscode/README.md Normal file
View File

@@ -0,0 +1,25 @@
![sx](cover.png)
# sx for Visual Studio Code
Language support for the [sx programming language](https://git.swipelab.com/lab/sx).
## Features
- **Syntax highlighting** for `.sx` files, including embedded GLSL, SQL, HTML, and JSON blocks.
- **Language server integration** — the extension launches the `sx` binary's language server (`sx lsp`) to provide editor intelligence.
- **Breakpoints** registered for the `sx` language.
## Requirements
The `sx` compiler must be installed and on your `PATH` (or point the extension at it via the setting below). The extension shells out to it for the language server.
## Settings
| Setting | Default | Description |
|---------|---------|-------------|
| `sx.lspPath` | `sx` | Path to the `sx` binary used to start the language server (`sx lsp`). |
## License
See the repository for license details.

BIN
editors/vscode/cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
editors/vscode/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,19 @@
"description": "Language support for the sx programming language",
"version": "0.0.1",
"publisher": "swipelab",
"icon": "icon.png",
"galleryBanner": {
"color": "#000000",
"theme": "dark"
},
"repository": {
"type": "git",
"url": "https://git.swipelab.com/lab/sx.git"
},
"homepage": "https://git.swipelab.com/lab/sx",
"bugs": {
"url": "https://git.swipelab.com/lab/sx/issues"
},
"engines": {
"vscode": "^1.75.0"
},
@@ -73,13 +86,16 @@
},
"scripts": {
"build": "tsc -p .",
"watch": "tsc -watch -p ."
"watch": "tsc -watch -p .",
"vscode:prepublish": "npm run build",
"package": "vsce package --baseContentUrl https://git.swipelab.com/lab/sx/src/branch/master/editors/vscode --baseImagesUrl https://git.swipelab.com/lab/sx/raw/branch/master/editors/vscode"
},
"dependencies": {
"vscode-languageclient": "^9.0.1"
},
"devDependencies": {
"@types/vscode": "^1.75.0",
"@vscode/vsce": "^3.9.2",
"typescript": "^5.0.0"
}
}

Binary file not shown.

View File

@@ -193,6 +193,10 @@
"name": "keyword.other.sx",
"match": "\\b(enum|struct)\\b"
},
{
"name": "storage.modifier.sx",
"match": "\\b(extern|export)\\b"
},
{
"name": "keyword.operator.cast.sx",
"match": "\\bxx\\b"