tree-sitter-fsharp
F# grammars for tree-sitter, packaged for Python.
The package ships two parsers:
| Function | Grammar | File types |
|---|---|---|
language() |
implementation files | .fs, .fsx |
language_signature() |
signature files | .fsi |
Installation
pip install tree-sitter-fsharp tree-sitter
Requires Python 3.10 or later. The tree-sitter runtime (~=0.24) is an optional
dependency, also installable as an extra:
pip install "tree-sitter-fsharp[core]"
Wheels are published for the common platforms; other platforms build the extension from the bundled C sources, which needs a C11 compiler.
Usage
from tree_sitter import Language, Parser
import tree_sitter_fsharp
parser = Parser(Language(tree_sitter_fsharp.language()))
tree = parser.parse(b"let x = 1\n")
print(tree.root_node)
Signature files need the other grammar — it is a separate parser, not a mode of the first:
parser = Parser(Language(tree_sitter_fsharp.language_signature()))
tree = parser.parse(b"module M\nval x : int\n")
Queries
Highlight, injection, locals and tags queries ship inside the package and are exposed as
lazily-read module attributes holding the query source (each is None when that query
file is absent):
import tree_sitter_fsharp
source = tree_sitter_fsharp.HIGHLIGHTS_QUERY
Available: HIGHLIGHTS_QUERY, INJECTIONS_QUERY, LOCALS_QUERY and TAGS_QUERY for the
implementation grammar, plus SIGNATURE_HIGHLIGHTS_QUERY and SIGNATURE_TAGS_QUERY for
the signature grammar.
Type stubs (py.typed, __init__.pyi) are included.
Contributing and grammar development
Grammar sources, the test corpus and the development workflow live in the repository: see the main README and AGENTS.md. Bug reports for mis-parsed F# code are welcome — reduce the snippet to a minimal example and open an issue or PR.
License
MIT — see LICENSE.
Metadata
Release files for tree-sitter-fsharp 0.3.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tree_sitter_fsharp-0.3.13.tar.gz | 4.0 MB | Without provenance | Details for tree_sitter_fsharp-0.3.13.tar.gz |
Built distributions (wheels)
Total release size: 14.9 MB
Release files / tree_sitter_fsharp-0.3.13.tar.gz
| Download URL | tree_sitter_fsharp-0.3.13.tar.gz |
|---|---|
| Size | 4.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a606c11b805e764290ab829dc7b1338ccc89d1f7b4a381349854893afe543ed1
|
|
BLAKE2b-256 checksum How to use checksums |
8bbb92c3167faebff735406baa126a7b3d67e98e79c26a3f80be12721d1ae8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_fsharp-0.3.13-cp310-abi3-win_arm64.whl
| Download URL | tree_sitter_fsharp-0.3.13-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
407d875b5d9f13e7cd5f152a071c31f595581bc3b18681a041b6008b75e4d683
|
|
BLAKE2b-256 checksum How to use checksums |
95c4612f8452fde627437db03b28b2023793c704a456dd8e4e1f83e169168027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_fsharp-0.3.13-cp310-abi3-win_amd64.whl
| Download URL | tree_sitter_fsharp-0.3.13-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
079090ff6244eb5b0bd4018b7f5d108cb93e3e18fc8f5879bb1f57811a6b9bd7
|
|
BLAKE2b-256 checksum How to use checksums |
b926c56af5cbbb3add1a3ee05866b5eccfec61ff7387559889a5103e9211c9db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_fsharp-0.3.13-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | tree_sitter_fsharp-0.3.13-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9a82f89eb9d9475639a49c928c6e3fa7659781b5ac529a0b9cbfe6f65b1db037
|
|
BLAKE2b-256 checksum How to use checksums |
f3025f5e0f93b7330ed679a50e368cc9ddc96ca3c2924fbfedfe4eed6188a882
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_fsharp-0.3.13-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | tree_sitter_fsharp-0.3.13-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
8db2b5a5d09aec45defa26a03a3e9853ede831cf920a335fba0293a819ae0b98
|
|
BLAKE2b-256 checksum How to use checksums |
8679d5f14648cff0370db61f5f5b263b518e2fd1453a19d893f14a904a374c50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_fsharp-0.3.13-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | tree_sitter_fsharp-0.3.13-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
43fd85b12cc745134f928c797eeee42c9101a8b193e3fc981b5d4906cadb1481
|
|
BLAKE2b-256 checksum How to use checksums |
94c90e23683a8ddf1b03bfb6af41956de0141d410e5381e313a1e13b07dec70d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_fsharp-0.3.13-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | tree_sitter_fsharp-0.3.13-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
45de20848792d54cb9bab444568d9010f00a57fe728de4d09986f166fa0679de
|
|
BLAKE2b-256 checksum How to use checksums |
10fbdc5d1f5142ca533a05e7901a77121846bcbbbc9dca5ec52d93cb80ffb193
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_fsharp-0.3.13-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | tree_sitter_fsharp-0.3.13-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
459836011da8cf4efe65521790a8c162921c7fffdd669dcdaa12978d9cc88d53
|
|
BLAKE2b-256 checksum How to use checksums |
2a10e11d5f5ce277ec094d045614b2bd01a520cc5e69e2a5ee5abc4af5bd5aa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / tree_sitter_fsharp-0.3.13-cp310-abi3-macosx_10_9_x86_64.whl
| Download URL | tree_sitter_fsharp-0.3.13-cp310-abi3-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 abi3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
c7c900e3b32088c590fc4a668a8e4c87bd63ffd0ba4d0de08aaf4e541875bab0
|
|
BLAKE2b-256 checksum How to use checksums |
10e5ef399ef9cfea0837b3d554a32f14a902fbfc9aeb70640001eac3816f53a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for tree-sitter-fsharp 0.3.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.