Class TreeSitter


  • public final class TreeSitter
    extends Object
    Utility used for obtaining the current version of the tree-sitter API.
    Since:
    1.11.0
    Author:
    Ozren Dabić
    • Constructor Detail

      • TreeSitter

        public TreeSitter()
    • Method Detail

      • getVersion

        public static String getVersion()
        Get the current version of tree-sitter.
        Returns:
        the semantic version string, along with a commit SHA
      • getCurrentABIVersion

        public static int getCurrentABIVersion()
        The latest ABI version that is supported by the current version of the library. When languages are generated by the tree-sitter CLI, they are assigned an ABI version number that corresponds to the current CLI version.
        Returns:
        current ABI version number
        Since:
        1.12.0
      • getMinimumABIVersion

        public static int getMinimumABIVersion()
        The earliest ABI version that is supported by the current version of the library. The tree-sitter library is generally backwards-compatible with languages generated using older CLI versions, but is not forwards-compatible.
        Returns:
        earliest supported ABI version number
        Since:
        1.12.0