Enforce Script
Project description
tree-sitter-enforce
Enforce grammar for tree-sitter.
This grammar intends to be a close approximation of the Enforce script "specification".
[!NOTE] We don't have official specification; some opinionated choices may have been taken (e.g. mandatory semicolon terminated statements)
Read more about it here
Getting started
neovim
Neovim doesn't recognize the Enforce filetype, and since it uses .c file
extension, you need to add a custom language filetype; add the following
somewhere in your init.lua
vim.filetype.add({
pattern = {
[".*/scripts/.*/.*%.c"] = "enforce",
},
})
The pattern will match all .c files in a scripts/some_module/ directory.
You may have to modify the pattern to suit your needs.
To install the parser, you can use
nvim-treesitter plugin
and run :TSInstall enforce
VSCode
[!NOTE] This has not been tested. Use at your own discretion
You can use tree-sitter-vscode plugin.
You'll likely need tree-sitter-enforce.wasm, which you can find in the
releases
or you can clone this repository and build it with tree-sitter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tree_sitter_enforce-0.4.0.tar.gz.
File metadata
- Download URL: tree_sitter_enforce-0.4.0.tar.gz
- Upload date:
- Size: 75.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac400b64fcda86c5cb4c4051b6dcf43c70b114edd9ac8ff632dac531942afeec
|
|
| MD5 |
2cf25d78072fbfe0bed93971f75198cf
|
|
| BLAKE2b-256 |
243e75048a72d9cb04affe6de80ea62b11dab28e8ce61fda645fd05f249806de
|
File details
Details for the file tree_sitter_enforce-0.4.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: tree_sitter_enforce-0.4.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 39.8 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
208b2133b101546929bb8b720444ff333ffaae21b2321f6bf57f4c0376da737c
|
|
| MD5 |
60718825c3c544d7befa64fc382f07a9
|
|
| BLAKE2b-256 |
09c79ed33b9dc3a2a503af073f6ffe9cd3d941f754da4ac8a4e19d95a6798314
|
File details
Details for the file tree_sitter_enforce-0.4.0-cp310-abi3-win32.whl.
File metadata
- Download URL: tree_sitter_enforce-0.4.0-cp310-abi3-win32.whl
- Upload date:
- Size: 39.5 kB
- Tags: CPython 3.10+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eb272d863ff0d92c87680828757a14452cc26f8c6184c321941eeae5a9fe430
|
|
| MD5 |
8fd781dd9252a998beb0f74d4c0ae426
|
|
| BLAKE2b-256 |
65f0c179704f363990c7b04f432e3270c5bb5c249393638d697080307b2c73dc
|
File details
Details for the file tree_sitter_enforce-0.4.0-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tree_sitter_enforce-0.4.0-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 55.0 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2badfcbf10eb62a6a7561b60c40f6572b07308cd54f121fb29f049c254fb0dbd
|
|
| MD5 |
67d3efbfe7fa860226d1b5dcc90b8f29
|
|
| BLAKE2b-256 |
46c4b708d41187fc13534bbc8ace9324fe53eb8add1267b216360c8d3748a1b6
|
File details
Details for the file tree_sitter_enforce-0.4.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: tree_sitter_enforce-0.4.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 56.5 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4beaedb736945a52ebd627f33dc00f43ec401604c3d8c0fca4558ae3273fa42
|
|
| MD5 |
52ddc8c8a748471608f2352cbaeb8418
|
|
| BLAKE2b-256 |
995c90958099d2ea6e34624088089ded4b13275863d1485e31a05a8e670825e5
|
File details
Details for the file tree_sitter_enforce-0.4.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tree_sitter_enforce-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 39.2 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d46b8afd96bd237a381598bd0d0f0b2be4425e4f39b36c1f65a03404dda855b
|
|
| MD5 |
245ecced950eced40d35afac9aa21e34
|
|
| BLAKE2b-256 |
c8211af7e772bfbb77e15a9b7e7ebe7d76cf8eb5d1dac4b3c3fea95c57952069
|