Skip to main content

tree-sitter-gosu

License: MIT Version

A Tree-sitter grammar that parses Gosu, a statically typed, JVM-based general-purpose programming language.

Requirements

  • Python >=3.14
  • Poetry 2.2
  • Node.js (for tree-sitter-cli, used to regenerate the parser from grammar.js)
  • A C compiler (MSVC on Windows, GCC/Clang on Linux/macOS) to build the native extension and run tree-sitter test/tree-sitter parse

Installation

poetry install

Usage

import tree_sitter
import tree_sitter_gosu

language = tree_sitter.Language(tree_sitter_gosu.language())
parser = tree_sitter.Parser(language)
tree = parser.parse(b"class Foo { function bar(): int { return 1 } }")

Development

Install dependencies

poetry install

Run tests with coverage

poetry run pytest --cov=tree_sitter_gosu tests --cov-report html

Format and lint

poetry run black tree_sitter_gosu; poetry run pylint tree_sitter_gosu

Regenerate the parser from grammar.js

npm install
npx tree-sitter generate
npx tree-sitter test

Configuration

Set the TREE_SITTER_GOSU_CONFIG_DIR environment variable to override the default configuration directory.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for tree-sitter-gosu 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tree-sitter-gosu 0.2.1
File Size Uploaded
tree_sitter_gosu-0.2.1.tar.gz 140.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-gosu 0.2.1
File Interpreter ABI Platform
tree_sitter_gosu-0.2.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
tree_sitter_gosu-0.2.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
tree_sitter_gosu-0.2.1-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details

Total release size: 345.3 kB

Release files / tree_sitter_gosu-0.2.1.tar.gz

Download URL tree_sitter_gosu-0.2.1.tar.gz
Size 140.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e22ed1e0273a1b77382847b59c04ba6eb1d6560551822647d580edcf31e9d20f
BLAKE2b-256 checksum
How to use checksums
bccaf77a682289ed550379732149a45680757a8f4351a651aa82acac8202cc56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / tree_sitter_gosu-0.2.1-cp314-cp314-win_amd64.whl

Download URL tree_sitter_gosu-0.2.1-cp314-cp314-win_amd64.whl
Size 48.3 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
83e1f178c1bdd1f9158d875515e30ced8d3a93b6ddc2bcf9cc882bdccc7f0777
BLAKE2b-256 checksum
How to use checksums
ccc6e58b4a1b3ec29a15a7d8b85975abbbd05c8a90bf4a020c5b238986d215a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / tree_sitter_gosu-0.2.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL tree_sitter_gosu-0.2.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 68.6 kB
Tags CPython 3.14 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
2cac3f63f5edc270e67ff9de58226183d989e7aeb3e5b911c5ffc17eb569f9de
BLAKE2b-256 checksum
How to use checksums
fb79afb1c1a3e80aa1279578129790518633294f95f36406d36a6beddf3843f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / tree_sitter_gosu-0.2.1-cp314-cp314-macosx_26_0_arm64.whl

Download URL tree_sitter_gosu-0.2.1-cp314-cp314-macosx_26_0_arm64.whl
Size 87.6 kB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
8ebe94078bb05024fddf486ba9a32f5530a6382c6d5e928c0accd2db95fdbbb9
BLAKE2b-256 checksum
How to use checksums
01b6beeaac77119a4d4ed144a0aa0957ccfe367efa5493dcd0390902bbe15cfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.2.1 This release

4 release files

0.2.0

4 release files

0.1.2

4 release files

0.1.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page