class TreeSitter::Language

Overview

A Language defines how to parse a particular programming language. The code for each Language is generated by Tree-sitter. Many languages are already available in separate git repositories within the the Tree-sitter GitHub organization.

Defined in:

tree_sitter/language.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String) #

[View source]

Instance Method Detail

def abi_version : Int32 #

Get the ABI version number for this language. This version number is used to ensure that languages were generated by a compatible version of Tree-sitter.

See also Parser#language=.


[View source]
def field_count : UInt32 #

Get the number of distinct field names in the language.


[View source]
def highlight_query : Query #

[View source]
def highlight_query? : Query | Nil #

[View source]
def injection_regex : Regex #

[View source]
def injection_regex? : Regex | Nil #

[View source]
def name : String #

[View source]
def symbol_count : UInt32 #

Get the number of distinct node types in the language.


[View source]