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.

Release files for tree-sitter-gosu 0.2.0

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.0
File Size Uploaded
tree_sitter_gosu-0.2.0.tar.gz 139.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-gosu 0.2.0
File Interpreter ABI Platform
tree_sitter_gosu-0.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
tree_sitter_gosu-0.2.0-cp314-cp314-manylinux_2_39_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.39+ x86-64 Details
tree_sitter_gosu-0.2.0-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details

Total release size: 342.4 kB

Release files / tree_sitter_gosu-0.2.0.tar.gz

Download URL tree_sitter_gosu-0.2.0.tar.gz
Size 139.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9a0a209fa991c746988290914ecee2b4c9f29f2f65d307a10bad8b9415dd2a09
BLAKE2b-256 checksum
How to use checksums
aa03a56be7407afa08c370c5a5d58bfe7c9fd37344613f9e38c0cc4e138b1f98
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.0-cp314-cp314-win_amd64.whl

Download URL tree_sitter_gosu-0.2.0-cp314-cp314-win_amd64.whl
Size 48.1 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
2376ba10e4890296ad48adda7beff8c6cf0a88099c3d1506ea058ab996fc0505
BLAKE2b-256 checksum
How to use checksums
4f49f5d7d34c38e5ac4f63120ff4a4804a7bb2a47e28c2519a86d75957c9664f
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.0-cp314-cp314-manylinux_2_39_x86_64.whl

Download URL tree_sitter_gosu-0.2.0-cp314-cp314-manylinux_2_39_x86_64.whl
Size 67.7 kB
Tags CPython 3.14 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
ad91ce5d1e5ebb80f0b55fc2f7e2297915f142b71a03d32669f52bec4de4a488
BLAKE2b-256 checksum
How to use checksums
987fce5b43ffe442e901cb6fabfeb5ef26fcdf949d7a6e1ef2b21a8b80666b10
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.0-cp314-cp314-macosx_26_0_arm64.whl

Download URL tree_sitter_gosu-0.2.0-cp314-cp314-macosx_26_0_arm64.whl
Size 87.2 kB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
58b5b0df1622a7fbc4260b8ca0d0e5310e6b2ba48689f3bc24536a8c73bf2e06
BLAKE2b-256 checksum
How to use checksums
bf315df339dd5f648a6483b535b797e32bf7163b38fe04a1172e25b032c29265
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.0 This release

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