plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
baca938
— Peter John
2026-11-05T19:15:16+05:30
Move plum-tooling and scripts under compiler/
Generated files not shown: compiler/tooling/tree-sitter-plum/Cargo.lock, compiler/tooling/vscode-plum/package-lock.json
- .vscode/launch.json +1 -1
- Makefile.toml +4 -4
- README.md +3 -3
- compiler/checker/Cargo.toml +1 -1
- compiler/cli/Cargo.toml +1 -1
- compiler/cli/build.rs +5 -5
- compiler/cli/src/editor.rs +10 -10
- compiler/core/Cargo.toml +1 -1
- compiler/core/src/formatter.rs +1 -1
- compiler/lsp/Cargo.toml +1 -1
- {scripts → compiler/scripts}/wasm-hashes.sh +1 -1
- compiler/test-support/Cargo.toml +1 -1
- {plum-tooling → compiler/tooling}/tree-sitter-plum/.gitattributes +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/.gitignore +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/.helix/languages.toml +1 -1
- {plum-tooling → compiler/tooling}/tree-sitter-plum/.recall/.capture.json +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/.recall/history.md +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/Cargo.toml +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/LICENSE +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/Makefile +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/bindings/rust/build.rs +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/bindings/rust/lib.rs +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/grammar.js +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/format.scm +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/highlights.scm +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/indents.scm +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/injections.scm +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/tags.scm +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/textobjects.scm +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/src/grammar.json +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/src/node-types.json +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/src/parser.c +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/src/scanner.c +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/src/tree_sitter/alloc.h +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/src/tree_sitter/array.h +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/src/tree_sitter/parser.h +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/aa.plum +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/.recall/.capture.json +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/.recall/history.md +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/annotated_decl.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/assert.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/assign.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/closure_match_arg.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/const.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/digit_names.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/enum.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/export.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/fn_generics.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/for.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/function.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/if.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/inline_if.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/list_literal.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/literals.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/match.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/mut_fields.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/pair_argument.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/question.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/records.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/single_letter.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/struct.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/struct_unified.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/test.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/trait.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/type.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/union_enum.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/while.txt +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/test/highlight/sample.plum +0 -0
- {plum-tooling → compiler/tooling}/tree-sitter-plum/tree-sitter.json +0 -0
- {plum-tooling → compiler/tooling}/vscode-plum/language-configuration.json +0 -0
- {plum-tooling → compiler/tooling}/vscode-plum/package.json +0 -0
- {plum-tooling → compiler/tooling}/vscode-plum/src/extension.ts +0 -0
- {plum-tooling → compiler/tooling}/vscode-plum/syntaxes/plum.tmLanguage.json +0 -0
- {plum-tooling → compiler/tooling}/vscode-plum/tsconfig.json +0 -0
- compiler/wasm-codegen/Cargo.toml +1 -1
- docs/backlog.md +1 -1
.vscode/launch.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "extensionHost",
|
|
11
11
|
"request": "launch",
|
|
12
12
|
"args": [
|
|
13
|
-
"--extensionDevelopmentPath=${workspaceFolder}/
|
|
13
|
+
"--extensionDevelopmentPath=${workspaceFolder}/compiler/tooling/vscode-plum"
|
|
14
14
|
]
|
|
15
15
|
}
|
|
16
16
|
]
|
Makefile.toml
CHANGED
|
@@ -16,7 +16,7 @@ description = "Compile the tree-sitter-plum grammar into a native shared library
|
|
|
16
16
|
script_runner = "@shell"
|
|
17
17
|
script = '''
|
|
18
18
|
set -e
|
|
19
|
-
SRC=
|
|
19
|
+
SRC=compiler/tooling/tree-sitter-plum/src
|
|
20
20
|
OUT=target/plum-grammar.so
|
|
21
21
|
mkdir -p target
|
|
22
22
|
${CC:-cc} -shared -fPIC -O2 -I "$SRC" -o "$OUT" "$SRC/parser.c" "$SRC/scanner.c"
|
|
@@ -50,7 +50,7 @@ if [ -f "$HELIX_DIR/languages.toml" ]; then
|
|
|
50
50
|
mkdir -p "$HELIX_DIR/runtime/grammars"
|
|
51
51
|
install_native "$GRAMMAR_SO" "$HELIX_DIR/runtime/grammars/plum.so"
|
|
52
52
|
mkdir -p "$HELIX_DIR/runtime/queries/plum"
|
|
53
|
-
cp
|
|
53
|
+
cp compiler/tooling/tree-sitter-plum/queries/plum/*.scm "$HELIX_DIR/runtime/queries/plum/"
|
|
54
54
|
install_native "$LSP_BIN" "$HELIX_DIR/plum-lsp"
|
|
55
55
|
chmod +x "$HELIX_DIR/plum-lsp"
|
|
56
56
|
echo "refreshed $HELIX_DIR/runtime/grammars/plum.so"
|
|
@@ -69,8 +69,8 @@ for dir_name in .vscode .vscode-insiders; do
|
|
|
69
69
|
mkdir -p "$ext_dir/server" "$ext_dir/syntaxes"
|
|
70
70
|
install_native "$LSP_BIN" "$ext_dir/server/plum-lsp"
|
|
71
71
|
chmod +x "$ext_dir/server/plum-lsp"
|
|
72
|
-
cp
|
|
72
|
+
cp compiler/tooling/vscode-plum/syntaxes/plum.tmLanguage.json "$ext_dir/syntaxes/"
|
|
73
|
-
cp
|
|
73
|
+
cp compiler/tooling/vscode-plum/language-configuration.json "$ext_dir/"
|
|
74
74
|
echo "refreshed $ext_dir/server/plum-lsp"
|
|
75
75
|
echo "refreshed $ext_dir/syntaxes/plum.tmLanguage.json"
|
|
76
76
|
found_vscode=1
|
README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A statically typed, imperative programming language with algebraic data types, inspired by Rust, Zig, Go, Kotlin and Gleam.
|
|
4
4
|
|
|
5
|
-
- Built on a [tree-sitter](
|
|
5
|
+
- Built on a [tree-sitter](compiler/tooling/tree-sitter-plum) grammar, with syntax highlighting and a language server for Helix and VSCode out of the box (`plum editor helix` / `plum editor vscode`)
|
|
6
6
|
- Compiles to WebAssembly (wasm-gc) and runs under wasmtime; `plum build` embeds the module into a native executable. Native targets (amd64, arm64, riscv64 via QBE, C-ABI compatible) are planned.
|
|
7
7
|
|
|
8
8
|
## Language at a glance
|
|
@@ -110,7 +110,7 @@ A call that returns `Unit` can be a bare statement, and so can the last expressi
|
|
|
110
110
|
|
|
111
111
|
## Installing
|
|
112
112
|
|
|
113
|
-
Prebuilt binaries need nothing else. To build from source you need a recent stable Rust toolchain and a C compiler (for the tree-sitter parser). `node` and `npm` are only needed to rebuild the VSCode extension bundle (`npm install && npm run build` in `
|
|
113
|
+
Prebuilt binaries need nothing else. To build from source you need a recent stable Rust toolchain and a C compiler (for the tree-sitter parser). `node` and `npm` are only needed to rebuild the VSCode extension bundle (`npm install && npm run build` in `compiler/tooling/vscode-plum`); without them `plum editor vscode` still installs syntax highlighting.
|
|
114
114
|
|
|
115
115
|
```sh
|
|
116
116
|
cargo install --path compiler/cli
|
|
@@ -1336,4 +1336,4 @@ plum editor helix # tree-sitter grammar, queries and plum-lsp for Helix
|
|
|
1336
1336
|
plum editor vscode # the VSCode extension (add --insiders for VSCode Insiders)
|
|
1337
1337
|
```
|
|
1338
1338
|
|
|
1339
|
-
Both install syntax highlighting and the `plum-lsp` language server (syntax and type diagnostics, keyword and member completion). The grammar, queries and VSCode extension live in [`
|
|
1339
|
+
Both install syntax highlighting and the `plum-lsp` language server (syntax and type diagnostics, keyword and member completion). The grammar, queries and VSCode extension live in [`compiler/tooling/`](compiler/tooling); everything is embedded in the `plum` binary, so the commands work from any directory. Reload the editor window afterwards.
|
compiler/checker/Cargo.toml
CHANGED
|
@@ -10,4 +10,4 @@ plum-core = { path = "../core" }
|
|
|
10
10
|
plum-test-support = { path = "../test-support" }
|
|
11
11
|
plum-driver = { path = "../driver" }
|
|
12
12
|
tree-sitter = "0.26"
|
|
13
|
-
tree-sitter-plum = { path = "../
|
|
13
|
+
tree-sitter-plum = { path = "../tooling/tree-sitter-plum" }
|
compiler/cli/Cargo.toml
CHANGED
|
@@ -16,7 +16,7 @@ plum-wasm-codegen = { path = "../wasm-codegen" }
|
|
|
16
16
|
clap = { version = "4", features = ["derive"] }
|
|
17
17
|
anyhow = "1"
|
|
18
18
|
tree-sitter = "0.26"
|
|
19
|
-
tree-sitter-plum = { path = "../
|
|
19
|
+
tree-sitter-plum = { path = "../tooling/tree-sitter-plum" }
|
|
20
20
|
toml_edit = "0.22"
|
|
21
21
|
wasmtime = "47"
|
|
22
22
|
plum-host = { path = "../host" }
|
compiler/cli/build.rs
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
//! the outer build's lock).
|
|
18
18
|
//! 3. The VSCode extension's bundled JS client (`vscode-languageclient`
|
|
19
19
|
//! wired up to spawn (2)) — built once via `npm run build` in
|
|
20
|
-
//! `
|
|
20
|
+
//! `compiler/tooling/vscode-plum` if its `node_modules` are already installed;
|
|
21
21
|
//! if not (a fresh checkout with no `npm install` run yet), this reuses
|
|
22
22
|
//! whatever `out/extension.js` is already on disk, however stale, rather
|
|
23
23
|
//! than failing the build.
|
|
@@ -55,7 +55,7 @@ fn main() {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
fn buildGrammarSo(manifest_dir: &std::path::Path, out_dir: &std::path::Path) {
|
|
58
|
-
let src_dir = manifest_dir.join("../
|
|
58
|
+
let src_dir = manifest_dir.join("../tooling/tree-sitter-plum/src");
|
|
59
59
|
let so_path = out_dir.join("plum-grammar.so");
|
|
60
60
|
|
|
61
61
|
println!(
|
|
@@ -157,7 +157,7 @@ fn buildPlumLsp(manifest_dir: &std::path::Path, out_dir: &std::path::Path) {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
/// Bundles `
|
|
160
|
+
/// Bundles `compiler/tooling/vscode-plum`'s TypeScript LSP client into a single
|
|
161
161
|
/// `out/extension.js` (via its own `npm run build`, an `esbuild` bundle with
|
|
162
162
|
/// `vscode-languageclient` inlined so the installed extension needs no
|
|
163
163
|
/// `node_modules` of its own) and embeds that bundle. Requires `node_modules`
|
|
@@ -167,7 +167,7 @@ fn buildPlumLsp(manifest_dir: &std::path::Path, out_dir: &std::path::Path) {
|
|
|
167
167
|
/// whatever `out/extension.js` already exists on disk (however stale) if
|
|
168
168
|
/// not, and to an empty placeholder if neither exists.
|
|
169
169
|
fn buildVscodeExtensionClient(manifest_dir: &std::path::Path, out_dir: &std::path::Path) {
|
|
170
|
-
let ext_dir = manifest_dir.join("../
|
|
170
|
+
let ext_dir = manifest_dir.join("../tooling/vscode-plum");
|
|
171
171
|
let embed_path = out_dir.join("vscode-extension.js");
|
|
172
172
|
|
|
173
173
|
println!(
|
|
@@ -189,7 +189,7 @@ fn buildVscodeExtensionClient(manifest_dir: &std::path::Path, out_dir: &std::pat
|
|
|
189
189
|
} else {
|
|
190
190
|
std::fs::write(&embed_path, []).expect("failed to write placeholder extension.js");
|
|
191
191
|
println!(
|
|
192
|
-
"cargo:warning=
|
|
192
|
+
"cargo:warning=compiler/tooling/vscode-plum/out/extension.js not found (run `npm install && npm run build` there); `plum editor vscode` will install syntax highlighting only, no language server"
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
195
|
println!(
|
compiler/cli/src/editor.rs
CHANGED
|
@@ -23,11 +23,11 @@ pub enum EditorType {
|
|
|
23
23
|
|
|
24
24
|
// ---- embedded VSCode extension assets -------------------------------------
|
|
25
25
|
|
|
26
|
-
const VSCODE_PACKAGE_JSON: &str = include_str!("../../
|
|
26
|
+
const VSCODE_PACKAGE_JSON: &str = include_str!("../../tooling/vscode-plum/package.json");
|
|
27
27
|
const VSCODE_LANGUAGE_CONFIG: &str =
|
|
28
|
-
include_str!("../../
|
|
28
|
+
include_str!("../../tooling/vscode-plum/language-configuration.json");
|
|
29
29
|
const VSCODE_TMLANGUAGE: &str =
|
|
30
|
-
include_str!("../../
|
|
30
|
+
include_str!("../../tooling/vscode-plum/syntaxes/plum.tmLanguage.json");
|
|
31
31
|
|
|
32
32
|
const VSCODE_PUBLISHER: &str = "plum-lang";
|
|
33
33
|
const VSCODE_EXTENSION_NAME: &str = "plum";
|
|
@@ -36,14 +36,14 @@ const VSCODE_EXTENSION_VERSION: &str = "0.0.1";
|
|
|
36
36
|
// ---- embedded Helix / tree-sitter query assets ----------------------------
|
|
37
37
|
|
|
38
38
|
const HELIX_HIGHLIGHTS: &str =
|
|
39
|
-
include_str!("../../
|
|
39
|
+
include_str!("../../tooling/tree-sitter-plum/queries/plum/highlights.scm");
|
|
40
40
|
const HELIX_INDENTS: &str =
|
|
41
|
-
include_str!("../../
|
|
41
|
+
include_str!("../../tooling/tree-sitter-plum/queries/plum/indents.scm");
|
|
42
42
|
const HELIX_INJECTIONS: &str =
|
|
43
|
-
include_str!("../../
|
|
43
|
+
include_str!("../../tooling/tree-sitter-plum/queries/plum/injections.scm");
|
|
44
|
-
const HELIX_TAGS: &str = include_str!("../../
|
|
44
|
+
const HELIX_TAGS: &str = include_str!("../../tooling/tree-sitter-plum/queries/plum/tags.scm");
|
|
45
45
|
const HELIX_TEXTOBJECTS: &str =
|
|
46
|
-
include_str!("../../
|
|
46
|
+
include_str!("../../tooling/tree-sitter-plum/queries/plum/textobjects.scm");
|
|
47
47
|
|
|
48
48
|
/// Precompiled by `build.rs` from the same `parser.c`/`scanner.c` that back
|
|
49
49
|
/// in-process parsing, on whatever machine builds this `plum` binary. Empty
|
|
@@ -63,7 +63,7 @@ const PLUM_LSP_BIN: &[u8] = include_bytes!(env!("PLUM_LSP_BIN"));
|
|
|
63
63
|
|
|
64
64
|
/// The bundled VSCode extension JS client (esbuild output, `vscode-languageclient`
|
|
65
65
|
/// inlined) that spawns [`PLUM_LSP_BIN`] — see `build.rs`. Empty if
|
|
66
|
-
/// `
|
|
66
|
+
/// `compiler/tooling/vscode-plum` had no `node_modules`/prior build to embed.
|
|
67
67
|
const VSCODE_EXTENSION_JS: &[u8] = include_bytes!(env!("PLUM_VSCODE_EXTENSION_JS"));
|
|
68
68
|
|
|
69
69
|
/// The absolute path to the `tree-sitter-plum` grammar crate on the machine that
|
|
@@ -73,7 +73,7 @@ const VSCODE_EXTENSION_JS: &[u8] = include_bytes!(env!("PLUM_VSCODE_EXTENSION_JS
|
|
|
73
73
|
/// that goes stale the moment the repo moves.
|
|
74
74
|
const TREE_SITTER_PLUM_DIR: &str = concat!(
|
|
75
75
|
env!("CARGO_MANIFEST_DIR"),
|
|
76
|
-
"/../
|
|
76
|
+
"/../tooling/tree-sitter-plum"
|
|
77
77
|
);
|
|
78
78
|
|
|
79
79
|
/// [`TREE_SITTER_PLUM_DIR`] with the `..` component resolved away, for a tidier
|
compiler/core/Cargo.toml
CHANGED
|
@@ -5,7 +5,7 @@ edition = "2021"
|
|
|
5
5
|
|
|
6
6
|
[dependencies]
|
|
7
7
|
tree-sitter = "0.26"
|
|
8
|
-
tree-sitter-plum = { path = "../
|
|
8
|
+
tree-sitter-plum = { path = "../tooling/tree-sitter-plum" }
|
|
9
9
|
topiary-core = "0.7.3"
|
|
10
10
|
topiary-tree-sitter-facade = "0.7.3"
|
|
11
11
|
|
compiler/core/src/formatter.rs
CHANGED
|
@@ -4,7 +4,7 @@ use std::io::Cursor;
|
|
|
4
4
|
use topiary_core::{formatter, Language, Operation, TopiaryQuery};
|
|
5
5
|
|
|
6
6
|
const FORMAT_QUERY: &str =
|
|
7
|
-
include_str!("../../
|
|
7
|
+
include_str!("../../tooling/tree-sitter-plum/queries/plum/format.scm");
|
|
8
8
|
|
|
9
9
|
#[derive(Debug)]
|
|
10
10
|
pub enum FormatterError {
|
compiler/lsp/Cargo.toml
CHANGED
|
@@ -12,6 +12,6 @@ plum-core = { path = "../core" }
|
|
|
12
12
|
plum-checker = { path = "../checker" }
|
|
13
13
|
plum-driver = { path = "../driver" }
|
|
14
14
|
tree-sitter = "0.26"
|
|
15
|
-
tree-sitter-plum = { path = "../
|
|
15
|
+
tree-sitter-plum = { path = "../tooling/tree-sitter-plum" }
|
|
16
16
|
tower-lsp = "0.20"
|
|
17
17
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-std"] }
|
{scripts → compiler/scripts}/wasm-hashes.sh
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Usage: scripts/wasm-hashes.sh REV OUT
|
|
2
|
+
# Usage: compiler/scripts/wasm-hashes.sh REV OUT
|
|
3
3
|
# Compiles every examples/**/*.plum (most have no `fun main`, so no filter) at git REV
|
|
4
4
|
# (one fresh `plum compile` process per file) and writes `<sha256> <relpath>` lines to OUT,
|
|
5
5
|
# sorted by relpath. Files that fail to compile print `FAIL <relpath>`.
|
compiler/test-support/Cargo.toml
CHANGED
|
@@ -8,6 +8,6 @@ plum-core = { path = "../core" }
|
|
|
8
8
|
plum-driver = { path = "../driver" }
|
|
9
9
|
plum-wasm-codegen = { path = "../wasm-codegen" }
|
|
10
10
|
tree-sitter = "0.26"
|
|
11
|
-
tree-sitter-plum = { path = "../
|
|
11
|
+
tree-sitter-plum = { path = "../tooling/tree-sitter-plum" }
|
|
12
12
|
wasmparser = "0.220"
|
|
13
13
|
wasmtime = "47"
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/.gitattributes
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/.gitignore
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/.helix/languages.toml
RENAMED
|
@@ -8,4 +8,4 @@ indent = { tab-width = 2, unit = " " }
|
|
|
8
8
|
|
|
9
9
|
[[grammar]]
|
|
10
10
|
name = "plum"
|
|
11
|
-
source.path = "/Users/pyrossh/Code/plum/
|
|
11
|
+
source.path = "/Users/pyrossh/Code/plum/compiler/tooling/tree-sitter-plum"
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/.recall/.capture.json
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/.recall/history.md
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/Cargo.toml
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/LICENSE
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/Makefile
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/bindings/rust/build.rs
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/bindings/rust/lib.rs
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/grammar.js
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/format.scm
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/highlights.scm
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/indents.scm
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/injections.scm
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/tags.scm
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/queries/plum/textobjects.scm
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/src/grammar.json
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/src/node-types.json
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/src/parser.c
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/src/scanner.c
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/src/tree_sitter/alloc.h
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/src/tree_sitter/array.h
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/src/tree_sitter/parser.h
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/aa.plum
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/.recall/.capture.json
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/.recall/history.md
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/annotated_decl.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/assert.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/assign.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/closure_match_arg.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/const.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/digit_names.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/enum.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/export.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/fn_generics.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/for.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/function.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/if.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/inline_if.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/list_literal.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/literals.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/match.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/mut_fields.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/pair_argument.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/question.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/records.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/single_letter.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/struct.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/struct_unified.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/test.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/trait.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/type.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/union_enum.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/corpus/while.txt
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/test/highlight/sample.plum
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/tree-sitter-plum/tree-sitter.json
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/vscode-plum/language-configuration.json
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/vscode-plum/package.json
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/vscode-plum/src/extension.ts
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/vscode-plum/syntaxes/plum.tmLanguage.json
RENAMED
|
File without changes
|
{plum-tooling → compiler/tooling}/vscode-plum/tsconfig.json
RENAMED
|
File without changes
|
compiler/wasm-codegen/Cargo.toml
CHANGED
|
@@ -13,5 +13,5 @@ plum-driver = { path = "../driver" }
|
|
|
13
13
|
plum-test-support = { path = "../test-support" }
|
|
14
14
|
wasmparser = "0.220"
|
|
15
15
|
tree-sitter = "0.26"
|
|
16
|
-
tree-sitter-plum = { path = "../
|
|
16
|
+
tree-sitter-plum = { path = "../tooling/tree-sitter-plum" }
|
|
17
17
|
wasmtime = "47"
|
docs/backlog.md
CHANGED
|
@@ -4,7 +4,7 @@ Open work, in the order the user queued it, plus smaller items found during buil
|
|
|
4
4
|
|
|
5
5
|
## Planned (in order)
|
|
6
6
|
|
|
7
|
-
**Current order (user 2026-11-05):** explicit fn generics (done faa4d7e) → cleanup phase 3b (pass list, positioned errors; running) → Io primitive + extern methods → move Rust crates under `compiler/` →
|
|
7
|
+
**Current order (user 2026-11-05):** explicit fn generics (done faa4d7e) → cleanup phase 3b (pass list, positioned errors; running) → Io primitive + extern methods → move Rust crates under `compiler/` → tooling + scripts moved under compiler/ (done) → cleanup phase 4 (node ids, typed codegen; also: `inferExpr` returns `Diagnostic` with spans, removing 3b's registered-message match for undefined names) → phase 5 (file splits, enum kinds) → phase 6 (tests in Plum) → benchmark (incl. iterator unboxing / niche Option, run C game A/B) → FBIP (stop for user approval) → deterministic sim → kids' games. The items below keep their detail; this line wins on order.
|
|
8
8
|
|
|
9
9
|
1. **Compiler cleanup and architecture** — `docs/plans/2026-11-04-compiler-cleanup.review.md` (written in another session; meant to run after language-restrictions merged). Approved 2026-11-04; running on branch `superlite/compiler-cleanup`, phase 1 first.
|
|
10
10
|
- **Explicit function generics** (user 2026-11-04: right after cleanup phase 2) — functions declare their generics (`fun map[B](...)`) instead of every single capital letter being a generic; allows longer generic names and one-letter concrete types/tags. Grammar change + about 140 signatures in std/examples. Phase 2's "generics by scope" makes this mostly a grammar + signature rewrite.
|