Skip to main content

Enforce Script

Project description

tree-sitter-enforce

CI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_enforce-0.4.0.tar.gz (75.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_enforce-0.4.0-cp310-abi3-win_amd64.whl (39.8 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_enforce-0.4.0-cp310-abi3-win32.whl (39.5 kB view details)

Uploaded CPython 3.10+Windows x86

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 (55.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

tree_sitter_enforce-0.4.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (56.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

tree_sitter_enforce-0.4.0-cp310-abi3-macosx_11_0_arm64.whl (39.2 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

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

Hashes for tree_sitter_enforce-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ac400b64fcda86c5cb4c4051b6dcf43c70b114edd9ac8ff632dac531942afeec
MD5 2cf25d78072fbfe0bed93971f75198cf
BLAKE2b-256 243e75048a72d9cb04affe6de80ea62b11dab28e8ce61fda645fd05f249806de

See more details on using hashes here.

File details

Details for the file tree_sitter_enforce-0.4.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_enforce-0.4.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 208b2133b101546929bb8b720444ff333ffaae21b2321f6bf57f4c0376da737c
MD5 60718825c3c544d7befa64fc382f07a9
BLAKE2b-256 09c79ed33b9dc3a2a503af073f6ffe9cd3d941f754da4ac8a4e19d95a6798314

See more details on using hashes here.

File details

Details for the file tree_sitter_enforce-0.4.0-cp310-abi3-win32.whl.

File metadata

File hashes

Hashes for tree_sitter_enforce-0.4.0-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 5eb272d863ff0d92c87680828757a14452cc26f8c6184c321941eeae5a9fe430
MD5 8fd781dd9252a998beb0f74d4c0ae426
BLAKE2b-256 65f0c179704f363990c7b04f432e3270c5bb5c249393638d697080307b2c73dc

See more details on using hashes here.

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

File hashes

Hashes for 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
Algorithm Hash digest
SHA256 2badfcbf10eb62a6a7561b60c40f6572b07308cd54f121fb29f049c254fb0dbd
MD5 67d3efbfe7fa860226d1b5dcc90b8f29
BLAKE2b-256 46c4b708d41187fc13534bbc8ace9324fe53eb8add1267b216360c8d3748a1b6

See more details on using hashes here.

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

File hashes

Hashes for tree_sitter_enforce-0.4.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b4beaedb736945a52ebd627f33dc00f43ec401604c3d8c0fca4558ae3273fa42
MD5 52ddc8c8a748471608f2352cbaeb8418
BLAKE2b-256 995c90958099d2ea6e34624088089ded4b13275863d1485e31a05a8e670825e5

See more details on using hashes here.

File details

Details for the file tree_sitter_enforce-0.4.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_enforce-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4d46b8afd96bd237a381598bd0d0f0b2be4425e4f39b36c1f65a03404dda855b
MD5 245ecced950eced40d35afac9aa21e34
BLAKE2b-256 c8211af7e772bfbb77e15a9b7e7ebe7d76cf8eb5d1dac4b3c3fea95c57952069

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page