tree_sitter_language

Tree-sitter language type for MoonBit grammar bindings

tree-sitter
parser
language
moon add tonyfettes/tree_sitter_language@0.1.3
Download zip
Version
0.1.3
License
Apache-2.0
Last updated
4 months ago
Downloads
1K
README

#tonyfettes/tree_sitter_language

The tree-sitter language type used by generated tree-sitter binding.

[!NOTE] This package is not meant to be used directly. It is used by the MoonBit bindings of tree-sitter grammars to provide a common language type so that they can be used with tonyfettes/tree_sitter.

#Usage (for grammar developers)

  1. Add this module as a dependency to the MoonBit binding:

    moon update # Update the mooncakes.io package index moon add tonyfettes/tree_sitter_language

  2. Import the tonyfettes/tree_sitter_language package in moon.pkg.json:

    { "import": [ "tonyfettes/tree_sitter_language" ] }

  3. Make your the entry point of your grammar module return a @tree_sitter_language.Language:

    ///|
    extern "c" fn language -> @tree_sitter_language.Language = "tree_sitter_xxx"

#
Language

#external
pub type Language

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io