plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


plum-tooling/tree-sitter-plum/Makefile
ab4f826 1
TREE_SITTER := npx --yes tree-sitter-cli
ab4f826 2
4aca0b2 3
build:
ab4f826 4
		$(TREE_SITTER) generate
ab4f826 5
		$(TREE_SITTER) build -o grammars/plum.so
4aca0b2 6
4aca0b2 7
corpus_test:
ab4f826 8
		$(TREE_SITTER) generate
ab4f826 9
		$(TREE_SITTER) test
4a2384c 10
4a2384c 11
# Rebuilds the grammar and (re)compiles it into Helix's runtime so editor
4a2384c 12
# highlighting/parsing picks up grammar.js/query changes. Requires
4a2384c 13
# ~/.helix/languages.toml (or $XDG_CONFIG_HOME/helix/languages.toml) to
4a2384c 14
# already have a [[grammar]] entry for "plum" pointing at this directory.
4a2384c 15
#
4a2384c 16
# `hx --grammar build` rebuilds every grammar in languages.toml and exits
4a2384c 17
# non-zero if ANY of them fail, even ones unrelated to plum, so failure here
4a2384c 18
# is only real if "plum" itself isn't in the built/already-built list.
4a2384c 19
helix: build
4a2384c 20
		hx --grammar build 2>&1 | tee /tmp/plum-hx-grammar-build.log; \
4a2384c 21
		grep -qE '"plum"' /tmp/plum-hx-grammar-build.log