Documentation
¶
Index ¶
- Constants
- func CalculateEdit(start, end ts.Point, oldSrc []byte, newSrc []byte) *ts.InputEdit
- func CalculateNewEndPoint(start ts.Point, src []byte) ts.Point
- func FiletypeToLanguage(t file.Type) string
- func FirstNamedChild(node *ts.Node) *ts.Node
- func FirstNamedChildOfKind(node *ts.Node, kind string) *ts.Node
- func GetLanguage(lang string) *ts.Language
- func GetRowByte(row uint, src []byte) uint
- func NamedChildOfKind(node *ts.Node, kind string) *ts.Node
- func PointInRange(p ts.Point, r ts.Range) bool
- func PointToByteOffset(point ts.Point, src []byte) uint
- func RangeOverlap(a ts.Range, b ts.Range) bool
- func RangeOverlapBytes(a ts.Range, b ts.Range) bool
- type Capture
- type CaptureSlice
Constants ¶
View Source
const ( LangaugeUnknown = "unknown" LanguageHTML = "html" LanguagePhp = "php" LanguagePhpOnly = "php_only" LanguageBlade = "blade" LanguageDotEnv = "dotenv" )
Constants for all treesitter languages that are supported
Variables ¶
This section is empty.
Functions ¶
func CalculateEdit ¶
Calculate a treesitter InputEdit object.
func CalculateNewEndPoint ¶
Calculate a new endpoint
func FiletypeToLanguage ¶
Get the language for a particular filetype
func GetLanguage ¶
func PointInRange ¶
Returns true if point p is inside range r
func PointToByteOffset ¶
Get the byte offset for a point.
func RangeOverlap ¶
Returns true if range a and b overlaps. (calculated using point fields)
Types ¶
Click to show internal directories.
Click to hide internal directories.