Documentation
¶
Overview ¶
Package ts provides low-level Go bindings for the tree-sitter C API.
Index ¶
- func Close() error
- func Has(symbol string) bool
- func HasLanguageAbiVersion() bool
- func HasLanguageCopy() bool
- func HasLanguageDelete() bool
- func HasLanguageFieldCount() bool
- func HasLanguageFieldIdForName() bool
- func HasLanguageFieldNameForId() bool
- func HasLanguageMetadata() bool
- func HasLanguageName() bool
- func HasLanguageNextState() bool
- func HasLanguageStateCount() bool
- func HasLanguageSubtypes() bool
- func HasLanguageSupertypes() bool
- func HasLanguageSymbolCount() bool
- func HasLanguageSymbolForName() bool
- func HasLanguageSymbolName() bool
- func HasLanguageSymbolType() bool
- func HasLookaheadIteratorCurrentSymbol() bool
- func HasLookaheadIteratorCurrentSymbolName() bool
- func HasLookaheadIteratorDelete() bool
- func HasLookaheadIteratorLanguage() bool
- func HasLookaheadIteratorNew() bool
- func HasLookaheadIteratorNext() bool
- func HasLookaheadIteratorReset() bool
- func HasLookaheadIteratorResetState() bool
- func HasNodeChild() bool
- func HasNodeChildByFieldId() bool
- func HasNodeChildByFieldName() bool
- func HasNodeChildCount() bool
- func HasNodeChildWithDescendant() bool
- func HasNodeDescendantCount() bool
- func HasNodeDescendantForByteRange() bool
- func HasNodeDescendantForPointRange() bool
- func HasNodeEdit() bool
- func HasNodeEndByte() bool
- func HasNodeEndPoint() bool
- func HasNodeEq() bool
- func HasNodeFieldNameForChild() bool
- func HasNodeFieldNameForNamedChild() bool
- func HasNodeFirstChildForByte() bool
- func HasNodeFirstNamedChildForByte() bool
- func HasNodeGrammarSymbol() bool
- func HasNodeGrammarType() bool
- func HasNodeHasChanges() bool
- func HasNodeHasError() bool
- func HasNodeIsError() bool
- func HasNodeIsExtra() bool
- func HasNodeIsMissing() bool
- func HasNodeIsNamed() bool
- func HasNodeIsNull() bool
- func HasNodeLanguage() bool
- func HasNodeNamedChild() bool
- func HasNodeNamedChildCount() bool
- func HasNodeNamedDescendantForByteRange() bool
- func HasNodeNamedDescendantForPointRange() bool
- func HasNodeNextNamedSibling() bool
- func HasNodeNextParseState() bool
- func HasNodeNextSibling() bool
- func HasNodeParent() bool
- func HasNodeParseState() bool
- func HasNodePrevNamedSibling() bool
- func HasNodePrevSibling() bool
- func HasNodeStartByte() bool
- func HasNodeStartPoint() bool
- func HasNodeString() bool
- func HasNodeSymbol() bool
- func HasNodeType() bool
- func HasParserDelete() bool
- func HasParserIncludedRanges() bool
- func HasParserLanguage() bool
- func HasParserLogger() bool
- func HasParserNew() bool
- func HasParserParse() bool
- func HasParserParseString() bool
- func HasParserParseStringEncoding() bool
- func HasParserParseWithOptions() bool
- func HasParserPrintDotGraphs() bool
- func HasParserReset() bool
- func HasParserSetIncludedRanges() bool
- func HasParserSetLanguage() bool
- func HasParserSetLogger() bool
- func HasPointEdit() bool
- func HasQueryCaptureCount() bool
- func HasQueryCaptureNameForId() bool
- func HasQueryCaptureQuantifierForId() bool
- func HasQueryCursorDelete() bool
- func HasQueryCursorDidExceedMatchLimit() bool
- func HasQueryCursorExec() bool
- func HasQueryCursorExecWithOptions() bool
- func HasQueryCursorMatchLimit() bool
- func HasQueryCursorNew() bool
- func HasQueryCursorNextCapture() bool
- func HasQueryCursorNextMatch() bool
- func HasQueryCursorRemoveMatch() bool
- func HasQueryCursorSetByteRange() bool
- func HasQueryCursorSetContainingByteRange() bool
- func HasQueryCursorSetContainingPointRange() bool
- func HasQueryCursorSetMatchLimit() bool
- func HasQueryCursorSetMaxStartDepth() bool
- func HasQueryCursorSetPointRange() bool
- func HasQueryDelete() bool
- func HasQueryDisableCapture() bool
- func HasQueryDisablePattern() bool
- func HasQueryEndByteForPattern() bool
- func HasQueryIsPatternGuaranteedAtStep() bool
- func HasQueryIsPatternNonLocal() bool
- func HasQueryIsPatternRooted() bool
- func HasQueryNew() bool
- func HasQueryPatternCount() bool
- func HasQueryPredicatesForPattern() bool
- func HasQueryStartByteForPattern() bool
- func HasQueryStringCount() bool
- func HasQueryStringValueForId() bool
- func HasRangeEdit() bool
- func HasTreeCopy() bool
- func HasTreeCursorCopy() bool
- func HasTreeCursorCurrentDepth() bool
- func HasTreeCursorCurrentDescendantIndex() bool
- func HasTreeCursorCurrentFieldId() bool
- func HasTreeCursorCurrentFieldName() bool
- func HasTreeCursorCurrentNode() bool
- func HasTreeCursorDelete() bool
- func HasTreeCursorGotoDescendant() bool
- func HasTreeCursorGotoFirstChild() bool
- func HasTreeCursorGotoFirstChildForByte() bool
- func HasTreeCursorGotoFirstChildForPoint() bool
- func HasTreeCursorGotoLastChild() bool
- func HasTreeCursorGotoNextSibling() bool
- func HasTreeCursorGotoParent() bool
- func HasTreeCursorGotoPreviousSibling() bool
- func HasTreeCursorNew() bool
- func HasTreeCursorReset() bool
- func HasTreeCursorResetTo() bool
- func HasTreeDelete() bool
- func HasTreeEdit() bool
- func HasTreeGetChangedRanges() bool
- func HasTreeIncludedRanges() bool
- func HasTreeLanguage() bool
- func HasTreePrintDotGraph() bool
- func HasTreeRootNode() bool
- func HasTreeRootNodeWithOffset() bool
- func LanguageAbiVersion(self Language) uint32
- func LanguageCopy(self Language) uintptr
- func LanguageDelete(self Language)
- func LanguageFieldCount(self Language) uint32
- func LanguageFieldNameForId(self Language, id FieldId) string
- func LanguageMetadata(self Language) uintptr
- func LanguageName(self Language) string
- func LanguageStateCount(self Language) uint32
- func LanguageSubtypes(self Language, supertype Symbol, length *uint32) uintptr
- func LanguageSupertypes(self Language, length *uint32) uintptr
- func LanguageSymbolCount(self Language) uint32
- func LanguageSymbolName(self Language, symbol Symbol) string
- func Load(path string) error
- func Loaded() bool
- func LookaheadIteratorCurrentSymbolName(self LookaheadIterator) string
- func LookaheadIteratorDelete(self LookaheadIterator)
- func LookaheadIteratorLanguage(self LookaheadIterator) uintptr
- func LookaheadIteratorNew(self Language, state StateId) uintptr
- func LookaheadIteratorNext(self LookaheadIterator) bool
- func LookaheadIteratorReset(self LookaheadIterator, language Language, state StateId) bool
- func LookaheadIteratorResetState(self LookaheadIterator, state StateId) bool
- func NodeChildCount(self Node) uint32
- func NodeDescendantCount(self Node) uint32
- func NodeEdit(self *Node, edit *InputEdit)
- func NodeEndByte(self Node) uint32
- func NodeEq(self Node, other Node) bool
- func NodeFieldNameForChild(self Node, childIndex uint32) string
- func NodeFieldNameForNamedChild(self Node, namedChildIndex uint32) string
- func NodeGrammarType(self Node) string
- func NodeHasChanges(self Node) bool
- func NodeHasError(self Node) bool
- func NodeIsError(self Node) bool
- func NodeIsExtra(self Node) bool
- func NodeIsMissing(self Node) bool
- func NodeIsNamed(self Node) bool
- func NodeIsNull(self Node) bool
- func NodeLanguage(self Node) uintptr
- func NodeNamedChildCount(self Node) uint32
- func NodeStartByte(self Node) uint32
- func NodeString(self Node) uintptr
- func NodeType(self Node) string
- func ParserDelete(self Parser)
- func ParserIncludedRanges(self Parser, count *uint32) uintptr
- func ParserLanguage(self Parser) uintptr
- func ParserNew() uintptr
- func ParserParse(self Parser, oldTree Tree, input Input) uintptr
- func ParserParseString(self Parser, oldTree Tree, string_ *byte, length uint32) uintptr
- func ParserParseStringEncoding(self Parser, oldTree Tree, string_ *byte, length uint32, ...) uintptr
- func ParserParseWithOptions(self Parser, oldTree Tree, input Input, parseOptions ParseOptions) uintptr
- func ParserPrintDotGraphs(self Parser, fd int32)
- func ParserReset(self Parser)
- func ParserSetIncludedRanges(self Parser, ranges *Range, count uint32) bool
- func ParserSetLanguage(self Parser, language Language) bool
- func ParserSetLogger(self Parser, logger Logger)
- func Path() string
- func PointEdit(point *Point, pointByte *uint32, edit *InputEdit)
- func QueryCaptureCount(self Query) uint32
- func QueryCaptureNameForId(self Query, index uint32, length *uint32) string
- func QueryCursorDelete(self QueryCursor)
- func QueryCursorDidExceedMatchLimit(self QueryCursor) bool
- func QueryCursorExec(self QueryCursor, query Query, node Node)
- func QueryCursorExecWithOptions(self QueryCursor, query Query, node Node, queryOptions *QueryCursorOptions)
- func QueryCursorMatchLimit(self QueryCursor) uint32
- func QueryCursorNew() uintptr
- func QueryCursorNextCapture(self QueryCursor, match *QueryMatch, captureIndex *uint32) bool
- func QueryCursorNextMatch(self QueryCursor, match *QueryMatch) bool
- func QueryCursorRemoveMatch(self QueryCursor, matchId uint32)
- func QueryCursorSetByteRange(self QueryCursor, startByte uint32, endByte uint32) bool
- func QueryCursorSetContainingByteRange(self QueryCursor, startByte uint32, endByte uint32) bool
- func QueryCursorSetContainingPointRange(self QueryCursor, startPoint Point, endPoint Point) bool
- func QueryCursorSetMatchLimit(self QueryCursor, limit uint32)
- func QueryCursorSetMaxStartDepth(self QueryCursor, maxStartDepth uint32)
- func QueryCursorSetPointRange(self QueryCursor, startPoint Point, endPoint Point) bool
- func QueryDelete(self Query)
- func QueryDisableCapture(self Query, name *byte, length uint32)
- func QueryDisablePattern(self Query, patternIndex uint32)
- func QueryEndByteForPattern(self Query, patternIndex uint32) uint32
- func QueryIsPatternGuaranteedAtStep(self Query, byteOffset uint32) bool
- func QueryIsPatternNonLocal(self Query, patternIndex uint32) bool
- func QueryIsPatternRooted(self Query, patternIndex uint32) bool
- func QueryNew(language Language, source *byte, sourceLen uint32, errorOffset *uint32, ...) uintptr
- func QueryPatternCount(self Query) uint32
- func QueryPredicatesForPattern(self Query, patternIndex uint32, stepCount *uint32) uintptr
- func QueryStartByteForPattern(self Query, patternIndex uint32) uint32
- func QueryStringCount(self Query) uint32
- func QueryStringValueForId(self Query, index uint32, length *uint32) string
- func RangeEdit(range_ *Range, edit *InputEdit)
- func TreeCopy(self Tree) uintptr
- func TreeCursorCurrentDepth(self *TreeCursor) uint32
- func TreeCursorCurrentDescendantIndex(self *TreeCursor) uint32
- func TreeCursorCurrentFieldName(self *TreeCursor) string
- func TreeCursorDelete(self *TreeCursor)
- func TreeCursorGotoDescendant(self *TreeCursor, goalDescendantIndex uint32)
- func TreeCursorGotoFirstChild(self *TreeCursor) bool
- func TreeCursorGotoFirstChildForByte(self *TreeCursor, goalByte uint32) int64
- func TreeCursorGotoFirstChildForPoint(self *TreeCursor, goalPoint Point) int64
- func TreeCursorGotoLastChild(self *TreeCursor) bool
- func TreeCursorGotoNextSibling(self *TreeCursor) bool
- func TreeCursorGotoParent(self *TreeCursor) bool
- func TreeCursorGotoPreviousSibling(self *TreeCursor) bool
- func TreeCursorReset(self *TreeCursor, node Node)
- func TreeCursorResetTo(dst *TreeCursor, src *TreeCursor)
- func TreeDelete(self Tree)
- func TreeEdit(self Tree, edit *InputEdit)
- func TreeGetChangedRanges(oldTree Tree, newTree Tree, length *uint32) uintptr
- func TreeIncludedRanges(self Tree, length *uint32) uintptr
- func TreeLanguage(self Tree) uintptr
- func TreePrintDotGraph(self Tree, fileDescriptor int32)
- type DecodeFunction
- type FieldId
- type Input
- type InputEdit
- type InputEncoding
- type Language
- type LanguageMetadataStruct
- type LibraryAttempt
- type LibraryConflictError
- type LibraryError
- type LogType
- type Logger
- type LookaheadIterator
- type Node
- func NodeChild(self Node, childIndex uint32) Node
- func NodeChildByFieldId(self Node, fieldId FieldId) Node
- func NodeChildByFieldName(self Node, name *byte, nameLength uint32) Node
- func NodeChildWithDescendant(self Node, descendant Node) Node
- func NodeDescendantForByteRange(self Node, start uint32, end uint32) Node
- func NodeDescendantForPointRange(self Node, start Point, end Point) Node
- func NodeFirstChildForByte(self Node, byte_ uint32) Node
- func NodeFirstNamedChildForByte(self Node, byte_ uint32) Node
- func NodeNamedChild(self Node, childIndex uint32) Node
- func NodeNamedDescendantForByteRange(self Node, start uint32, end uint32) Node
- func NodeNamedDescendantForPointRange(self Node, start Point, end Point) Node
- func NodeNextNamedSibling(self Node) Node
- func NodeNextSibling(self Node) Node
- func NodeParent(self Node) Node
- func NodePrevNamedSibling(self Node) Node
- func NodePrevSibling(self Node) Node
- func TreeCursorCurrentNode(self *TreeCursor) Node
- func TreeRootNode(self Tree) Node
- func TreeRootNodeWithOffset(self Tree, offsetBytes uint32, offsetExtent Point) Node
- type ParseOptions
- type ParseState
- type Parser
- type Point
- type Quantifier
- type Query
- type QueryCapture
- type QueryCursor
- type QueryCursorOptions
- type QueryCursorState
- type QueryError
- type QueryMatch
- type QueryPredicateStep
- type QueryPredicateStepType
- type Range
- type StateId
- type Symbol
- type SymbolError
- type SymbolType
- type Tree
- type TreeCursor
- type WasmEngine
- type WasmError
- type WasmErrorKind
- type WasmStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close() error
Close unloads the library and clears all bound function pointers.
The function pointers are package-level state, so Close must not be called concurrently with any other call into this package: doing so is a use-after-free. It is intended for test teardown, not for reclaiming a live library.
func Has ¶
Has reports whether the named C symbol resolved in the loaded library, loading it first if necessary. It returns false if the library failed to load. Use it to gate on capabilities before calling into them.
func HasLanguageAbiVersion ¶
func HasLanguageAbiVersion() bool
HasLanguageAbiVersion reports whether ts_language_abi_version resolved in the loaded library.
func HasLanguageCopy ¶
func HasLanguageCopy() bool
HasLanguageCopy reports whether ts_language_copy resolved in the loaded library.
func HasLanguageDelete ¶
func HasLanguageDelete() bool
HasLanguageDelete reports whether ts_language_delete resolved in the loaded library.
func HasLanguageFieldCount ¶
func HasLanguageFieldCount() bool
HasLanguageFieldCount reports whether ts_language_field_count resolved in the loaded library.
func HasLanguageFieldIdForName ¶
func HasLanguageFieldIdForName() bool
HasLanguageFieldIdForName reports whether ts_language_field_id_for_name resolved in the loaded library.
func HasLanguageFieldNameForId ¶
func HasLanguageFieldNameForId() bool
HasLanguageFieldNameForId reports whether ts_language_field_name_for_id resolved in the loaded library.
func HasLanguageMetadata ¶
func HasLanguageMetadata() bool
HasLanguageMetadata reports whether ts_language_metadata resolved in the loaded library.
func HasLanguageName ¶
func HasLanguageName() bool
HasLanguageName reports whether ts_language_name resolved in the loaded library.
func HasLanguageNextState ¶
func HasLanguageNextState() bool
HasLanguageNextState reports whether ts_language_next_state resolved in the loaded library.
func HasLanguageStateCount ¶
func HasLanguageStateCount() bool
HasLanguageStateCount reports whether ts_language_state_count resolved in the loaded library.
func HasLanguageSubtypes ¶
func HasLanguageSubtypes() bool
HasLanguageSubtypes reports whether ts_language_subtypes resolved in the loaded library.
func HasLanguageSupertypes ¶
func HasLanguageSupertypes() bool
HasLanguageSupertypes reports whether ts_language_supertypes resolved in the loaded library.
func HasLanguageSymbolCount ¶
func HasLanguageSymbolCount() bool
HasLanguageSymbolCount reports whether ts_language_symbol_count resolved in the loaded library.
func HasLanguageSymbolForName ¶
func HasLanguageSymbolForName() bool
HasLanguageSymbolForName reports whether ts_language_symbol_for_name resolved in the loaded library.
func HasLanguageSymbolName ¶
func HasLanguageSymbolName() bool
HasLanguageSymbolName reports whether ts_language_symbol_name resolved in the loaded library.
func HasLanguageSymbolType ¶
func HasLanguageSymbolType() bool
HasLanguageSymbolType reports whether ts_language_symbol_type resolved in the loaded library.
func HasLookaheadIteratorCurrentSymbol ¶
func HasLookaheadIteratorCurrentSymbol() bool
HasLookaheadIteratorCurrentSymbol reports whether ts_lookahead_iterator_current_symbol resolved in the loaded library.
func HasLookaheadIteratorCurrentSymbolName ¶
func HasLookaheadIteratorCurrentSymbolName() bool
HasLookaheadIteratorCurrentSymbolName reports whether ts_lookahead_iterator_current_symbol_name resolved in the loaded library.
func HasLookaheadIteratorDelete ¶
func HasLookaheadIteratorDelete() bool
HasLookaheadIteratorDelete reports whether ts_lookahead_iterator_delete resolved in the loaded library.
func HasLookaheadIteratorLanguage ¶
func HasLookaheadIteratorLanguage() bool
HasLookaheadIteratorLanguage reports whether ts_lookahead_iterator_language resolved in the loaded library.
func HasLookaheadIteratorNew ¶
func HasLookaheadIteratorNew() bool
HasLookaheadIteratorNew reports whether ts_lookahead_iterator_new resolved in the loaded library.
func HasLookaheadIteratorNext ¶
func HasLookaheadIteratorNext() bool
HasLookaheadIteratorNext reports whether ts_lookahead_iterator_next resolved in the loaded library.
func HasLookaheadIteratorReset ¶
func HasLookaheadIteratorReset() bool
HasLookaheadIteratorReset reports whether ts_lookahead_iterator_reset resolved in the loaded library.
func HasLookaheadIteratorResetState ¶
func HasLookaheadIteratorResetState() bool
HasLookaheadIteratorResetState reports whether ts_lookahead_iterator_reset_state resolved in the loaded library.
func HasNodeChild ¶
func HasNodeChild() bool
HasNodeChild reports whether ts_node_child resolved in the loaded library.
func HasNodeChildByFieldId ¶
func HasNodeChildByFieldId() bool
HasNodeChildByFieldId reports whether ts_node_child_by_field_id resolved in the loaded library.
func HasNodeChildByFieldName ¶
func HasNodeChildByFieldName() bool
HasNodeChildByFieldName reports whether ts_node_child_by_field_name resolved in the loaded library.
func HasNodeChildCount ¶
func HasNodeChildCount() bool
HasNodeChildCount reports whether ts_node_child_count resolved in the loaded library.
func HasNodeChildWithDescendant ¶
func HasNodeChildWithDescendant() bool
HasNodeChildWithDescendant reports whether ts_node_child_with_descendant resolved in the loaded library.
func HasNodeDescendantCount ¶
func HasNodeDescendantCount() bool
HasNodeDescendantCount reports whether ts_node_descendant_count resolved in the loaded library.
func HasNodeDescendantForByteRange ¶
func HasNodeDescendantForByteRange() bool
HasNodeDescendantForByteRange reports whether ts_node_descendant_for_byte_range resolved in the loaded library.
func HasNodeDescendantForPointRange ¶
func HasNodeDescendantForPointRange() bool
HasNodeDescendantForPointRange reports whether ts_node_descendant_for_point_range resolved in the loaded library.
func HasNodeEdit ¶
func HasNodeEdit() bool
HasNodeEdit reports whether ts_node_edit resolved in the loaded library.
func HasNodeEndByte ¶
func HasNodeEndByte() bool
HasNodeEndByte reports whether ts_node_end_byte resolved in the loaded library.
func HasNodeEndPoint ¶
func HasNodeEndPoint() bool
HasNodeEndPoint reports whether ts_node_end_point resolved in the loaded library.
func HasNodeEq ¶
func HasNodeEq() bool
HasNodeEq reports whether ts_node_eq resolved in the loaded library.
func HasNodeFieldNameForChild ¶
func HasNodeFieldNameForChild() bool
HasNodeFieldNameForChild reports whether ts_node_field_name_for_child resolved in the loaded library.
func HasNodeFieldNameForNamedChild ¶
func HasNodeFieldNameForNamedChild() bool
HasNodeFieldNameForNamedChild reports whether ts_node_field_name_for_named_child resolved in the loaded library.
func HasNodeFirstChildForByte ¶
func HasNodeFirstChildForByte() bool
HasNodeFirstChildForByte reports whether ts_node_first_child_for_byte resolved in the loaded library.
func HasNodeFirstNamedChildForByte ¶
func HasNodeFirstNamedChildForByte() bool
HasNodeFirstNamedChildForByte reports whether ts_node_first_named_child_for_byte resolved in the loaded library.
func HasNodeGrammarSymbol ¶
func HasNodeGrammarSymbol() bool
HasNodeGrammarSymbol reports whether ts_node_grammar_symbol resolved in the loaded library.
func HasNodeGrammarType ¶
func HasNodeGrammarType() bool
HasNodeGrammarType reports whether ts_node_grammar_type resolved in the loaded library.
func HasNodeHasChanges ¶
func HasNodeHasChanges() bool
HasNodeHasChanges reports whether ts_node_has_changes resolved in the loaded library.
func HasNodeHasError ¶
func HasNodeHasError() bool
HasNodeHasError reports whether ts_node_has_error resolved in the loaded library.
func HasNodeIsError ¶
func HasNodeIsError() bool
HasNodeIsError reports whether ts_node_is_error resolved in the loaded library.
func HasNodeIsExtra ¶
func HasNodeIsExtra() bool
HasNodeIsExtra reports whether ts_node_is_extra resolved in the loaded library.
func HasNodeIsMissing ¶
func HasNodeIsMissing() bool
HasNodeIsMissing reports whether ts_node_is_missing resolved in the loaded library.
func HasNodeIsNamed ¶
func HasNodeIsNamed() bool
HasNodeIsNamed reports whether ts_node_is_named resolved in the loaded library.
func HasNodeIsNull ¶
func HasNodeIsNull() bool
HasNodeIsNull reports whether ts_node_is_null resolved in the loaded library.
func HasNodeLanguage ¶
func HasNodeLanguage() bool
HasNodeLanguage reports whether ts_node_language resolved in the loaded library.
func HasNodeNamedChild ¶
func HasNodeNamedChild() bool
HasNodeNamedChild reports whether ts_node_named_child resolved in the loaded library.
func HasNodeNamedChildCount ¶
func HasNodeNamedChildCount() bool
HasNodeNamedChildCount reports whether ts_node_named_child_count resolved in the loaded library.
func HasNodeNamedDescendantForByteRange ¶
func HasNodeNamedDescendantForByteRange() bool
HasNodeNamedDescendantForByteRange reports whether ts_node_named_descendant_for_byte_range resolved in the loaded library.
func HasNodeNamedDescendantForPointRange ¶
func HasNodeNamedDescendantForPointRange() bool
HasNodeNamedDescendantForPointRange reports whether ts_node_named_descendant_for_point_range resolved in the loaded library.
func HasNodeNextNamedSibling ¶
func HasNodeNextNamedSibling() bool
HasNodeNextNamedSibling reports whether ts_node_next_named_sibling resolved in the loaded library.
func HasNodeNextParseState ¶
func HasNodeNextParseState() bool
HasNodeNextParseState reports whether ts_node_next_parse_state resolved in the loaded library.
func HasNodeNextSibling ¶
func HasNodeNextSibling() bool
HasNodeNextSibling reports whether ts_node_next_sibling resolved in the loaded library.
func HasNodeParent ¶
func HasNodeParent() bool
HasNodeParent reports whether ts_node_parent resolved in the loaded library.
func HasNodeParseState ¶
func HasNodeParseState() bool
HasNodeParseState reports whether ts_node_parse_state resolved in the loaded library.
func HasNodePrevNamedSibling ¶
func HasNodePrevNamedSibling() bool
HasNodePrevNamedSibling reports whether ts_node_prev_named_sibling resolved in the loaded library.
func HasNodePrevSibling ¶
func HasNodePrevSibling() bool
HasNodePrevSibling reports whether ts_node_prev_sibling resolved in the loaded library.
func HasNodeStartByte ¶
func HasNodeStartByte() bool
HasNodeStartByte reports whether ts_node_start_byte resolved in the loaded library.
func HasNodeStartPoint ¶
func HasNodeStartPoint() bool
HasNodeStartPoint reports whether ts_node_start_point resolved in the loaded library.
func HasNodeString ¶
func HasNodeString() bool
HasNodeString reports whether ts_node_string resolved in the loaded library.
func HasNodeSymbol ¶
func HasNodeSymbol() bool
HasNodeSymbol reports whether ts_node_symbol resolved in the loaded library.
func HasNodeType ¶
func HasNodeType() bool
HasNodeType reports whether ts_node_type resolved in the loaded library.
func HasParserDelete ¶
func HasParserDelete() bool
HasParserDelete reports whether ts_parser_delete resolved in the loaded library.
func HasParserIncludedRanges ¶
func HasParserIncludedRanges() bool
HasParserIncludedRanges reports whether ts_parser_included_ranges resolved in the loaded library.
func HasParserLanguage ¶
func HasParserLanguage() bool
HasParserLanguage reports whether ts_parser_language resolved in the loaded library.
func HasParserLogger ¶
func HasParserLogger() bool
HasParserLogger reports whether ts_parser_logger resolved in the loaded library.
func HasParserNew ¶
func HasParserNew() bool
HasParserNew reports whether ts_parser_new resolved in the loaded library.
func HasParserParse ¶
func HasParserParse() bool
HasParserParse reports whether ts_parser_parse resolved in the loaded library.
func HasParserParseString ¶
func HasParserParseString() bool
HasParserParseString reports whether ts_parser_parse_string resolved in the loaded library.
func HasParserParseStringEncoding ¶
func HasParserParseStringEncoding() bool
HasParserParseStringEncoding reports whether ts_parser_parse_string_encoding resolved in the loaded library.
func HasParserParseWithOptions ¶
func HasParserParseWithOptions() bool
HasParserParseWithOptions reports whether ts_parser_parse_with_options resolved in the loaded library.
func HasParserPrintDotGraphs ¶
func HasParserPrintDotGraphs() bool
HasParserPrintDotGraphs reports whether ts_parser_print_dot_graphs resolved in the loaded library.
func HasParserReset ¶
func HasParserReset() bool
HasParserReset reports whether ts_parser_reset resolved in the loaded library.
func HasParserSetIncludedRanges ¶
func HasParserSetIncludedRanges() bool
HasParserSetIncludedRanges reports whether ts_parser_set_included_ranges resolved in the loaded library.
func HasParserSetLanguage ¶
func HasParserSetLanguage() bool
HasParserSetLanguage reports whether ts_parser_set_language resolved in the loaded library.
func HasParserSetLogger ¶
func HasParserSetLogger() bool
HasParserSetLogger reports whether ts_parser_set_logger resolved in the loaded library.
func HasPointEdit ¶
func HasPointEdit() bool
HasPointEdit reports whether ts_point_edit resolved in the loaded library.
func HasQueryCaptureCount ¶
func HasQueryCaptureCount() bool
HasQueryCaptureCount reports whether ts_query_capture_count resolved in the loaded library.
func HasQueryCaptureNameForId ¶
func HasQueryCaptureNameForId() bool
HasQueryCaptureNameForId reports whether ts_query_capture_name_for_id resolved in the loaded library.
func HasQueryCaptureQuantifierForId ¶
func HasQueryCaptureQuantifierForId() bool
HasQueryCaptureQuantifierForId reports whether ts_query_capture_quantifier_for_id resolved in the loaded library.
func HasQueryCursorDelete ¶
func HasQueryCursorDelete() bool
HasQueryCursorDelete reports whether ts_query_cursor_delete resolved in the loaded library.
func HasQueryCursorDidExceedMatchLimit ¶
func HasQueryCursorDidExceedMatchLimit() bool
HasQueryCursorDidExceedMatchLimit reports whether ts_query_cursor_did_exceed_match_limit resolved in the loaded library.
func HasQueryCursorExec ¶
func HasQueryCursorExec() bool
HasQueryCursorExec reports whether ts_query_cursor_exec resolved in the loaded library.
func HasQueryCursorExecWithOptions ¶
func HasQueryCursorExecWithOptions() bool
HasQueryCursorExecWithOptions reports whether ts_query_cursor_exec_with_options resolved in the loaded library.
func HasQueryCursorMatchLimit ¶
func HasQueryCursorMatchLimit() bool
HasQueryCursorMatchLimit reports whether ts_query_cursor_match_limit resolved in the loaded library.
func HasQueryCursorNew ¶
func HasQueryCursorNew() bool
HasQueryCursorNew reports whether ts_query_cursor_new resolved in the loaded library.
func HasQueryCursorNextCapture ¶
func HasQueryCursorNextCapture() bool
HasQueryCursorNextCapture reports whether ts_query_cursor_next_capture resolved in the loaded library.
func HasQueryCursorNextMatch ¶
func HasQueryCursorNextMatch() bool
HasQueryCursorNextMatch reports whether ts_query_cursor_next_match resolved in the loaded library.
func HasQueryCursorRemoveMatch ¶
func HasQueryCursorRemoveMatch() bool
HasQueryCursorRemoveMatch reports whether ts_query_cursor_remove_match resolved in the loaded library.
func HasQueryCursorSetByteRange ¶
func HasQueryCursorSetByteRange() bool
HasQueryCursorSetByteRange reports whether ts_query_cursor_set_byte_range resolved in the loaded library.
func HasQueryCursorSetContainingByteRange ¶
func HasQueryCursorSetContainingByteRange() bool
HasQueryCursorSetContainingByteRange reports whether ts_query_cursor_set_containing_byte_range resolved in the loaded library.
func HasQueryCursorSetContainingPointRange ¶
func HasQueryCursorSetContainingPointRange() bool
HasQueryCursorSetContainingPointRange reports whether ts_query_cursor_set_containing_point_range resolved in the loaded library.
func HasQueryCursorSetMatchLimit ¶
func HasQueryCursorSetMatchLimit() bool
HasQueryCursorSetMatchLimit reports whether ts_query_cursor_set_match_limit resolved in the loaded library.
func HasQueryCursorSetMaxStartDepth ¶
func HasQueryCursorSetMaxStartDepth() bool
HasQueryCursorSetMaxStartDepth reports whether ts_query_cursor_set_max_start_depth resolved in the loaded library.
func HasQueryCursorSetPointRange ¶
func HasQueryCursorSetPointRange() bool
HasQueryCursorSetPointRange reports whether ts_query_cursor_set_point_range resolved in the loaded library.
func HasQueryDelete ¶
func HasQueryDelete() bool
HasQueryDelete reports whether ts_query_delete resolved in the loaded library.
func HasQueryDisableCapture ¶
func HasQueryDisableCapture() bool
HasQueryDisableCapture reports whether ts_query_disable_capture resolved in the loaded library.
func HasQueryDisablePattern ¶
func HasQueryDisablePattern() bool
HasQueryDisablePattern reports whether ts_query_disable_pattern resolved in the loaded library.
func HasQueryEndByteForPattern ¶
func HasQueryEndByteForPattern() bool
HasQueryEndByteForPattern reports whether ts_query_end_byte_for_pattern resolved in the loaded library.
func HasQueryIsPatternGuaranteedAtStep ¶
func HasQueryIsPatternGuaranteedAtStep() bool
HasQueryIsPatternGuaranteedAtStep reports whether ts_query_is_pattern_guaranteed_at_step resolved in the loaded library.
func HasQueryIsPatternNonLocal ¶
func HasQueryIsPatternNonLocal() bool
HasQueryIsPatternNonLocal reports whether ts_query_is_pattern_non_local resolved in the loaded library.
func HasQueryIsPatternRooted ¶
func HasQueryIsPatternRooted() bool
HasQueryIsPatternRooted reports whether ts_query_is_pattern_rooted resolved in the loaded library.
func HasQueryNew ¶
func HasQueryNew() bool
HasQueryNew reports whether ts_query_new resolved in the loaded library.
func HasQueryPatternCount ¶
func HasQueryPatternCount() bool
HasQueryPatternCount reports whether ts_query_pattern_count resolved in the loaded library.
func HasQueryPredicatesForPattern ¶
func HasQueryPredicatesForPattern() bool
HasQueryPredicatesForPattern reports whether ts_query_predicates_for_pattern resolved in the loaded library.
func HasQueryStartByteForPattern ¶
func HasQueryStartByteForPattern() bool
HasQueryStartByteForPattern reports whether ts_query_start_byte_for_pattern resolved in the loaded library.
func HasQueryStringCount ¶
func HasQueryStringCount() bool
HasQueryStringCount reports whether ts_query_string_count resolved in the loaded library.
func HasQueryStringValueForId ¶
func HasQueryStringValueForId() bool
HasQueryStringValueForId reports whether ts_query_string_value_for_id resolved in the loaded library.
func HasRangeEdit ¶
func HasRangeEdit() bool
HasRangeEdit reports whether ts_range_edit resolved in the loaded library.
func HasTreeCopy ¶
func HasTreeCopy() bool
HasTreeCopy reports whether ts_tree_copy resolved in the loaded library.
func HasTreeCursorCopy ¶
func HasTreeCursorCopy() bool
HasTreeCursorCopy reports whether ts_tree_cursor_copy resolved in the loaded library.
func HasTreeCursorCurrentDepth ¶
func HasTreeCursorCurrentDepth() bool
HasTreeCursorCurrentDepth reports whether ts_tree_cursor_current_depth resolved in the loaded library.
func HasTreeCursorCurrentDescendantIndex ¶
func HasTreeCursorCurrentDescendantIndex() bool
HasTreeCursorCurrentDescendantIndex reports whether ts_tree_cursor_current_descendant_index resolved in the loaded library.
func HasTreeCursorCurrentFieldId ¶
func HasTreeCursorCurrentFieldId() bool
HasTreeCursorCurrentFieldId reports whether ts_tree_cursor_current_field_id resolved in the loaded library.
func HasTreeCursorCurrentFieldName ¶
func HasTreeCursorCurrentFieldName() bool
HasTreeCursorCurrentFieldName reports whether ts_tree_cursor_current_field_name resolved in the loaded library.
func HasTreeCursorCurrentNode ¶
func HasTreeCursorCurrentNode() bool
HasTreeCursorCurrentNode reports whether ts_tree_cursor_current_node resolved in the loaded library.
func HasTreeCursorDelete ¶
func HasTreeCursorDelete() bool
HasTreeCursorDelete reports whether ts_tree_cursor_delete resolved in the loaded library.
func HasTreeCursorGotoDescendant ¶
func HasTreeCursorGotoDescendant() bool
HasTreeCursorGotoDescendant reports whether ts_tree_cursor_goto_descendant resolved in the loaded library.
func HasTreeCursorGotoFirstChild ¶
func HasTreeCursorGotoFirstChild() bool
HasTreeCursorGotoFirstChild reports whether ts_tree_cursor_goto_first_child resolved in the loaded library.
func HasTreeCursorGotoFirstChildForByte ¶
func HasTreeCursorGotoFirstChildForByte() bool
HasTreeCursorGotoFirstChildForByte reports whether ts_tree_cursor_goto_first_child_for_byte resolved in the loaded library.
func HasTreeCursorGotoFirstChildForPoint ¶
func HasTreeCursorGotoFirstChildForPoint() bool
HasTreeCursorGotoFirstChildForPoint reports whether ts_tree_cursor_goto_first_child_for_point resolved in the loaded library.
func HasTreeCursorGotoLastChild ¶
func HasTreeCursorGotoLastChild() bool
HasTreeCursorGotoLastChild reports whether ts_tree_cursor_goto_last_child resolved in the loaded library.
func HasTreeCursorGotoNextSibling ¶
func HasTreeCursorGotoNextSibling() bool
HasTreeCursorGotoNextSibling reports whether ts_tree_cursor_goto_next_sibling resolved in the loaded library.
func HasTreeCursorGotoParent ¶
func HasTreeCursorGotoParent() bool
HasTreeCursorGotoParent reports whether ts_tree_cursor_goto_parent resolved in the loaded library.
func HasTreeCursorGotoPreviousSibling ¶
func HasTreeCursorGotoPreviousSibling() bool
HasTreeCursorGotoPreviousSibling reports whether ts_tree_cursor_goto_previous_sibling resolved in the loaded library.
func HasTreeCursorNew ¶
func HasTreeCursorNew() bool
HasTreeCursorNew reports whether ts_tree_cursor_new resolved in the loaded library.
func HasTreeCursorReset ¶
func HasTreeCursorReset() bool
HasTreeCursorReset reports whether ts_tree_cursor_reset resolved in the loaded library.
func HasTreeCursorResetTo ¶
func HasTreeCursorResetTo() bool
HasTreeCursorResetTo reports whether ts_tree_cursor_reset_to resolved in the loaded library.
func HasTreeDelete ¶
func HasTreeDelete() bool
HasTreeDelete reports whether ts_tree_delete resolved in the loaded library.
func HasTreeEdit ¶
func HasTreeEdit() bool
HasTreeEdit reports whether ts_tree_edit resolved in the loaded library.
func HasTreeGetChangedRanges ¶
func HasTreeGetChangedRanges() bool
HasTreeGetChangedRanges reports whether ts_tree_get_changed_ranges resolved in the loaded library.
func HasTreeIncludedRanges ¶
func HasTreeIncludedRanges() bool
HasTreeIncludedRanges reports whether ts_tree_included_ranges resolved in the loaded library.
func HasTreeLanguage ¶
func HasTreeLanguage() bool
HasTreeLanguage reports whether ts_tree_language resolved in the loaded library.
func HasTreePrintDotGraph ¶
func HasTreePrintDotGraph() bool
HasTreePrintDotGraph reports whether ts_tree_print_dot_graph resolved in the loaded library.
func HasTreeRootNode ¶
func HasTreeRootNode() bool
HasTreeRootNode reports whether ts_tree_root_node resolved in the loaded library.
func HasTreeRootNodeWithOffset ¶
func HasTreeRootNodeWithOffset() bool
HasTreeRootNodeWithOffset reports whether ts_tree_root_node_with_offset resolved in the loaded library.
func LanguageAbiVersion ¶
LanguageAbiVersion wraps ts_language_abi_version. It panics if the library cannot be loaded or lacks the symbol.
func LanguageCopy ¶
LanguageCopy wraps ts_language_copy. It panics if the library cannot be loaded or lacks the symbol.
func LanguageDelete ¶
func LanguageDelete(self Language)
LanguageDelete wraps ts_language_delete. It panics if the library cannot be loaded or lacks the symbol.
func LanguageFieldCount ¶
LanguageFieldCount wraps ts_language_field_count. It panics if the library cannot be loaded or lacks the symbol.
func LanguageFieldNameForId ¶
LanguageFieldNameForId wraps ts_language_field_name_for_id. It panics if the library cannot be loaded or lacks the symbol.
func LanguageMetadata ¶
LanguageMetadata wraps ts_language_metadata. It panics if the library cannot be loaded or lacks the symbol.
func LanguageName ¶
LanguageName wraps ts_language_name. It panics if the library cannot be loaded or lacks the symbol.
func LanguageStateCount ¶
LanguageStateCount wraps ts_language_state_count. It panics if the library cannot be loaded or lacks the symbol.
func LanguageSubtypes ¶
LanguageSubtypes wraps ts_language_subtypes. It panics if the library cannot be loaded or lacks the symbol.
func LanguageSupertypes ¶
LanguageSupertypes wraps ts_language_supertypes. It panics if the library cannot be loaded or lacks the symbol.
func LanguageSymbolCount ¶
LanguageSymbolCount wraps ts_language_symbol_count. It panics if the library cannot be loaded or lacks the symbol.
func LanguageSymbolName ¶
LanguageSymbolName wraps ts_language_symbol_name. It panics if the library cannot be loaded or lacks the symbol.
func Load ¶
Load opens the shared library from path, or from the default search list when path is empty, and binds all symbols. Callers that need to direct loading should call Load before any other function; otherwise the first call loads from the default search list.
Load is idempotent: calling it again with the same path, or with an empty path, returns nil. Calling it with a different path after a successful load returns *LibraryConflictError rather than replacing the library. After a failed load, Load retries.
func Loaded ¶
func Loaded() bool
Loaded reports whether the library is currently loaded. It does not trigger a load.
func LookaheadIteratorCurrentSymbolName ¶
func LookaheadIteratorCurrentSymbolName(self LookaheadIterator) string
LookaheadIteratorCurrentSymbolName wraps ts_lookahead_iterator_current_symbol_name. It panics if the library cannot be loaded or lacks the symbol.
func LookaheadIteratorDelete ¶
func LookaheadIteratorDelete(self LookaheadIterator)
LookaheadIteratorDelete wraps ts_lookahead_iterator_delete. It panics if the library cannot be loaded or lacks the symbol.
func LookaheadIteratorLanguage ¶
func LookaheadIteratorLanguage(self LookaheadIterator) uintptr
LookaheadIteratorLanguage wraps ts_lookahead_iterator_language. It panics if the library cannot be loaded or lacks the symbol.
func LookaheadIteratorNew ¶
LookaheadIteratorNew wraps ts_lookahead_iterator_new. It panics if the library cannot be loaded or lacks the symbol.
func LookaheadIteratorNext ¶
func LookaheadIteratorNext(self LookaheadIterator) bool
LookaheadIteratorNext wraps ts_lookahead_iterator_next. It panics if the library cannot be loaded or lacks the symbol.
func LookaheadIteratorReset ¶
func LookaheadIteratorReset(self LookaheadIterator, language Language, state StateId) bool
LookaheadIteratorReset wraps ts_lookahead_iterator_reset. It panics if the library cannot be loaded or lacks the symbol.
func LookaheadIteratorResetState ¶
func LookaheadIteratorResetState(self LookaheadIterator, state StateId) bool
LookaheadIteratorResetState wraps ts_lookahead_iterator_reset_state. It panics if the library cannot be loaded or lacks the symbol.
func NodeChildCount ¶
NodeChildCount wraps ts_node_child_count. It panics if the library cannot be loaded or lacks the symbol.
func NodeDescendantCount ¶
NodeDescendantCount wraps ts_node_descendant_count. It panics if the library cannot be loaded or lacks the symbol.
func NodeEdit ¶
NodeEdit wraps ts_node_edit. It panics if the library cannot be loaded or lacks the symbol.
func NodeEndByte ¶
NodeEndByte wraps ts_node_end_byte. It panics if the library cannot be loaded or lacks the symbol.
func NodeEq ¶
NodeEq wraps ts_node_eq. It panics if the library cannot be loaded or lacks the symbol.
func NodeFieldNameForChild ¶
NodeFieldNameForChild wraps ts_node_field_name_for_child. It panics if the library cannot be loaded or lacks the symbol.
func NodeFieldNameForNamedChild ¶
NodeFieldNameForNamedChild wraps ts_node_field_name_for_named_child. It panics if the library cannot be loaded or lacks the symbol.
func NodeGrammarType ¶
NodeGrammarType wraps ts_node_grammar_type. It panics if the library cannot be loaded or lacks the symbol.
func NodeHasChanges ¶
NodeHasChanges wraps ts_node_has_changes. It panics if the library cannot be loaded or lacks the symbol.
func NodeHasError ¶
NodeHasError wraps ts_node_has_error. It panics if the library cannot be loaded or lacks the symbol.
func NodeIsError ¶
NodeIsError wraps ts_node_is_error. It panics if the library cannot be loaded or lacks the symbol.
func NodeIsExtra ¶
NodeIsExtra wraps ts_node_is_extra. It panics if the library cannot be loaded or lacks the symbol.
func NodeIsMissing ¶
NodeIsMissing wraps ts_node_is_missing. It panics if the library cannot be loaded or lacks the symbol.
func NodeIsNamed ¶
NodeIsNamed wraps ts_node_is_named. It panics if the library cannot be loaded or lacks the symbol.
func NodeIsNull ¶
NodeIsNull wraps ts_node_is_null. It panics if the library cannot be loaded or lacks the symbol.
func NodeLanguage ¶
NodeLanguage wraps ts_node_language. It panics if the library cannot be loaded or lacks the symbol.
func NodeNamedChildCount ¶
NodeNamedChildCount wraps ts_node_named_child_count. It panics if the library cannot be loaded or lacks the symbol.
func NodeStartByte ¶
NodeStartByte wraps ts_node_start_byte. It panics if the library cannot be loaded or lacks the symbol.
func NodeString ¶
NodeString wraps ts_node_string. It panics if the library cannot be loaded or lacks the symbol.
func NodeType ¶
NodeType wraps ts_node_type. It panics if the library cannot be loaded or lacks the symbol.
func ParserDelete ¶
func ParserDelete(self Parser)
ParserDelete wraps ts_parser_delete. It panics if the library cannot be loaded or lacks the symbol.
func ParserIncludedRanges ¶
ParserIncludedRanges wraps ts_parser_included_ranges. It panics if the library cannot be loaded or lacks the symbol.
func ParserLanguage ¶
ParserLanguage wraps ts_parser_language. It panics if the library cannot be loaded or lacks the symbol.
func ParserNew ¶
func ParserNew() uintptr
ParserNew wraps ts_parser_new. It panics if the library cannot be loaded or lacks the symbol.
func ParserParse ¶
ParserParse wraps ts_parser_parse. It panics if the library cannot be loaded or lacks the symbol.
func ParserParseString ¶
ParserParseString wraps ts_parser_parse_string. It panics if the library cannot be loaded or lacks the symbol.
func ParserParseStringEncoding ¶
func ParserParseStringEncoding(self Parser, oldTree Tree, string_ *byte, length uint32, encoding InputEncoding) uintptr
ParserParseStringEncoding wraps ts_parser_parse_string_encoding. It panics if the library cannot be loaded or lacks the symbol.
func ParserParseWithOptions ¶
func ParserParseWithOptions(self Parser, oldTree Tree, input Input, parseOptions ParseOptions) uintptr
ParserParseWithOptions wraps ts_parser_parse_with_options. It panics if the library cannot be loaded or lacks the symbol.
func ParserPrintDotGraphs ¶
ParserPrintDotGraphs wraps ts_parser_print_dot_graphs. It panics if the library cannot be loaded or lacks the symbol.
func ParserReset ¶
func ParserReset(self Parser)
ParserReset wraps ts_parser_reset. It panics if the library cannot be loaded or lacks the symbol.
func ParserSetIncludedRanges ¶
ParserSetIncludedRanges wraps ts_parser_set_included_ranges. It panics if the library cannot be loaded or lacks the symbol.
func ParserSetLanguage ¶
ParserSetLanguage wraps ts_parser_set_language. It panics if the library cannot be loaded or lacks the symbol.
func ParserSetLogger ¶
ParserSetLogger wraps ts_parser_set_logger. It panics if the library cannot be loaded or lacks the symbol.
func Path ¶
func Path() string
Path returns the path or name the loaded library was opened from, or the empty string if no library is loaded.
func PointEdit ¶
PointEdit wraps ts_point_edit. It panics if the library cannot be loaded or lacks the symbol.
func QueryCaptureCount ¶
QueryCaptureCount wraps ts_query_capture_count. It panics if the library cannot be loaded or lacks the symbol.
func QueryCaptureNameForId ¶
QueryCaptureNameForId wraps ts_query_capture_name_for_id. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorDelete ¶
func QueryCursorDelete(self QueryCursor)
QueryCursorDelete wraps ts_query_cursor_delete. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorDidExceedMatchLimit ¶
func QueryCursorDidExceedMatchLimit(self QueryCursor) bool
QueryCursorDidExceedMatchLimit wraps ts_query_cursor_did_exceed_match_limit. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorExec ¶
func QueryCursorExec(self QueryCursor, query Query, node Node)
QueryCursorExec wraps ts_query_cursor_exec. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorExecWithOptions ¶
func QueryCursorExecWithOptions(self QueryCursor, query Query, node Node, queryOptions *QueryCursorOptions)
QueryCursorExecWithOptions wraps ts_query_cursor_exec_with_options. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorMatchLimit ¶
func QueryCursorMatchLimit(self QueryCursor) uint32
QueryCursorMatchLimit wraps ts_query_cursor_match_limit. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorNew ¶
func QueryCursorNew() uintptr
QueryCursorNew wraps ts_query_cursor_new. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorNextCapture ¶
func QueryCursorNextCapture(self QueryCursor, match *QueryMatch, captureIndex *uint32) bool
QueryCursorNextCapture wraps ts_query_cursor_next_capture. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorNextMatch ¶
func QueryCursorNextMatch(self QueryCursor, match *QueryMatch) bool
QueryCursorNextMatch wraps ts_query_cursor_next_match. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorRemoveMatch ¶
func QueryCursorRemoveMatch(self QueryCursor, matchId uint32)
QueryCursorRemoveMatch wraps ts_query_cursor_remove_match. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorSetByteRange ¶
func QueryCursorSetByteRange(self QueryCursor, startByte uint32, endByte uint32) bool
QueryCursorSetByteRange wraps ts_query_cursor_set_byte_range. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorSetContainingByteRange ¶
func QueryCursorSetContainingByteRange(self QueryCursor, startByte uint32, endByte uint32) bool
QueryCursorSetContainingByteRange wraps ts_query_cursor_set_containing_byte_range. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorSetContainingPointRange ¶
func QueryCursorSetContainingPointRange(self QueryCursor, startPoint Point, endPoint Point) bool
QueryCursorSetContainingPointRange wraps ts_query_cursor_set_containing_point_range. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorSetMatchLimit ¶
func QueryCursorSetMatchLimit(self QueryCursor, limit uint32)
QueryCursorSetMatchLimit wraps ts_query_cursor_set_match_limit. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorSetMaxStartDepth ¶
func QueryCursorSetMaxStartDepth(self QueryCursor, maxStartDepth uint32)
QueryCursorSetMaxStartDepth wraps ts_query_cursor_set_max_start_depth. It panics if the library cannot be loaded or lacks the symbol.
func QueryCursorSetPointRange ¶
func QueryCursorSetPointRange(self QueryCursor, startPoint Point, endPoint Point) bool
QueryCursorSetPointRange wraps ts_query_cursor_set_point_range. It panics if the library cannot be loaded or lacks the symbol.
func QueryDelete ¶
func QueryDelete(self Query)
QueryDelete wraps ts_query_delete. It panics if the library cannot be loaded or lacks the symbol.
func QueryDisableCapture ¶
QueryDisableCapture wraps ts_query_disable_capture. It panics if the library cannot be loaded or lacks the symbol.
func QueryDisablePattern ¶
QueryDisablePattern wraps ts_query_disable_pattern. It panics if the library cannot be loaded or lacks the symbol.
func QueryEndByteForPattern ¶
QueryEndByteForPattern wraps ts_query_end_byte_for_pattern. It panics if the library cannot be loaded or lacks the symbol.
func QueryIsPatternGuaranteedAtStep ¶
QueryIsPatternGuaranteedAtStep wraps ts_query_is_pattern_guaranteed_at_step. It panics if the library cannot be loaded or lacks the symbol.
func QueryIsPatternNonLocal ¶
QueryIsPatternNonLocal wraps ts_query_is_pattern_non_local. It panics if the library cannot be loaded or lacks the symbol.
func QueryIsPatternRooted ¶
QueryIsPatternRooted wraps ts_query_is_pattern_rooted. It panics if the library cannot be loaded or lacks the symbol.
func QueryNew ¶
func QueryNew(language Language, source *byte, sourceLen uint32, errorOffset *uint32, errorType *QueryError) uintptr
QueryNew wraps ts_query_new. It panics if the library cannot be loaded or lacks the symbol.
func QueryPatternCount ¶
QueryPatternCount wraps ts_query_pattern_count. It panics if the library cannot be loaded or lacks the symbol.
func QueryPredicatesForPattern ¶
QueryPredicatesForPattern wraps ts_query_predicates_for_pattern. It panics if the library cannot be loaded or lacks the symbol.
func QueryStartByteForPattern ¶
QueryStartByteForPattern wraps ts_query_start_byte_for_pattern. It panics if the library cannot be loaded or lacks the symbol.
func QueryStringCount ¶
QueryStringCount wraps ts_query_string_count. It panics if the library cannot be loaded or lacks the symbol.
func QueryStringValueForId ¶
QueryStringValueForId wraps ts_query_string_value_for_id. It panics if the library cannot be loaded or lacks the symbol.
func RangeEdit ¶
RangeEdit wraps ts_range_edit. It panics if the library cannot be loaded or lacks the symbol.
func TreeCopy ¶
TreeCopy wraps ts_tree_copy. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorCurrentDepth ¶
func TreeCursorCurrentDepth(self *TreeCursor) uint32
TreeCursorCurrentDepth wraps ts_tree_cursor_current_depth. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorCurrentDescendantIndex ¶
func TreeCursorCurrentDescendantIndex(self *TreeCursor) uint32
TreeCursorCurrentDescendantIndex wraps ts_tree_cursor_current_descendant_index. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorCurrentFieldName ¶
func TreeCursorCurrentFieldName(self *TreeCursor) string
TreeCursorCurrentFieldName wraps ts_tree_cursor_current_field_name. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorDelete ¶
func TreeCursorDelete(self *TreeCursor)
TreeCursorDelete wraps ts_tree_cursor_delete. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorGotoDescendant ¶
func TreeCursorGotoDescendant(self *TreeCursor, goalDescendantIndex uint32)
TreeCursorGotoDescendant wraps ts_tree_cursor_goto_descendant. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorGotoFirstChild ¶
func TreeCursorGotoFirstChild(self *TreeCursor) bool
TreeCursorGotoFirstChild wraps ts_tree_cursor_goto_first_child. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorGotoFirstChildForByte ¶
func TreeCursorGotoFirstChildForByte(self *TreeCursor, goalByte uint32) int64
TreeCursorGotoFirstChildForByte wraps ts_tree_cursor_goto_first_child_for_byte. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorGotoFirstChildForPoint ¶
func TreeCursorGotoFirstChildForPoint(self *TreeCursor, goalPoint Point) int64
TreeCursorGotoFirstChildForPoint wraps ts_tree_cursor_goto_first_child_for_point. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorGotoLastChild ¶
func TreeCursorGotoLastChild(self *TreeCursor) bool
TreeCursorGotoLastChild wraps ts_tree_cursor_goto_last_child. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorGotoNextSibling ¶
func TreeCursorGotoNextSibling(self *TreeCursor) bool
TreeCursorGotoNextSibling wraps ts_tree_cursor_goto_next_sibling. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorGotoParent ¶
func TreeCursorGotoParent(self *TreeCursor) bool
TreeCursorGotoParent wraps ts_tree_cursor_goto_parent. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorGotoPreviousSibling ¶
func TreeCursorGotoPreviousSibling(self *TreeCursor) bool
TreeCursorGotoPreviousSibling wraps ts_tree_cursor_goto_previous_sibling. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorReset ¶
func TreeCursorReset(self *TreeCursor, node Node)
TreeCursorReset wraps ts_tree_cursor_reset. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorResetTo ¶
func TreeCursorResetTo(dst *TreeCursor, src *TreeCursor)
TreeCursorResetTo wraps ts_tree_cursor_reset_to. It panics if the library cannot be loaded or lacks the symbol.
func TreeDelete ¶
func TreeDelete(self Tree)
TreeDelete wraps ts_tree_delete. It panics if the library cannot be loaded or lacks the symbol.
func TreeEdit ¶
TreeEdit wraps ts_tree_edit. It panics if the library cannot be loaded or lacks the symbol.
func TreeGetChangedRanges ¶
TreeGetChangedRanges wraps ts_tree_get_changed_ranges. It panics if the library cannot be loaded or lacks the symbol.
func TreeIncludedRanges ¶
TreeIncludedRanges wraps ts_tree_included_ranges. It panics if the library cannot be loaded or lacks the symbol.
func TreeLanguage ¶
TreeLanguage wraps ts_tree_language. It panics if the library cannot be loaded or lacks the symbol.
func TreePrintDotGraph ¶
TreePrintDotGraph wraps ts_tree_print_dot_graph. It panics if the library cannot be loaded or lacks the symbol.
Types ¶
type FieldId ¶
type FieldId uint16
FieldId represents TSFieldId.
func LanguageFieldIdForName ¶
LanguageFieldIdForName wraps ts_language_field_id_for_name. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorCurrentFieldId ¶
func TreeCursorCurrentFieldId(self *TreeCursor) FieldId
TreeCursorCurrentFieldId wraps ts_tree_cursor_current_field_id. It panics if the library cannot be loaded or lacks the symbol.
type Input ¶
type Input struct {
Payload uintptr
Read uintptr
Encoding InputEncoding
Decode DecodeFunction
}
Input represents TSInput.
type InputEdit ¶
type InputEdit struct {
StartByte uint32
OldEndByte uint32
NewEndByte uint32
StartPoint Point
OldEndPoint Point
NewEndPoint Point
}
InputEdit represents A summary of a change to a text document..
type InputEncoding ¶
type InputEncoding int32
InputEncoding represents TSInputEncoding.
const ( InputEncodingUTF8 InputEncoding = 0 InputEncodingUTF16LE InputEncoding = 1 InputEncodingUTF16BE InputEncoding = 2 InputEncodingCustom InputEncoding = 3 )
func (InputEncoding) String ¶
func (e InputEncoding) String() string
type LanguageMetadataStruct ¶
LanguageMetadataStruct represents The metadata associated with a language..
type LibraryAttempt ¶
LibraryAttempt records one failed attempt to open the shared library.
type LibraryConflictError ¶
LibraryConflictError reports a Load call naming a different library than the one already loaded. Only one library is loaded per process.
func (*LibraryConflictError) Error ¶
func (e *LibraryConflictError) Error() string
type LibraryError ¶
type LibraryError struct {
Library string
Env string
Path string
Attempts []LibraryAttempt
Hint string
}
LibraryError reports that libtree-sitter could not be opened. Attempts lists every name tried in order. Path is set when an explicit path, from Load or TREE_SITTER_LIB_PATH, was requested and failed. Hint, when non-empty, says where pkg-config believes the library is installed.
func (*LibraryError) Error ¶
func (e *LibraryError) Error() string
func (*LibraryError) Unwrap ¶
func (e *LibraryError) Unwrap() []error
Unwrap returns the error from each attempt.
type Logger ¶
Logger represents TSLogger.
func ParserLogger ¶
ParserLogger wraps ts_parser_logger. It panics if the library cannot be loaded or lacks the symbol.
type LookaheadIterator ¶
type LookaheadIterator uintptr
LookaheadIterator is an opaque handle-like type for struct TSLookaheadIterator.
type Node ¶
Node represents TSNode.
func NodeChild ¶
NodeChild wraps ts_node_child. It panics if the library cannot be loaded or lacks the symbol.
func NodeChildByFieldId ¶
NodeChildByFieldId wraps ts_node_child_by_field_id. It panics if the library cannot be loaded or lacks the symbol.
func NodeChildByFieldName ¶
NodeChildByFieldName wraps ts_node_child_by_field_name. It panics if the library cannot be loaded or lacks the symbol.
func NodeChildWithDescendant ¶
NodeChildWithDescendant wraps ts_node_child_with_descendant. It panics if the library cannot be loaded or lacks the symbol.
func NodeDescendantForByteRange ¶
NodeDescendantForByteRange wraps ts_node_descendant_for_byte_range. It panics if the library cannot be loaded or lacks the symbol.
func NodeDescendantForPointRange ¶
NodeDescendantForPointRange wraps ts_node_descendant_for_point_range. It panics if the library cannot be loaded or lacks the symbol.
func NodeFirstChildForByte ¶
NodeFirstChildForByte wraps ts_node_first_child_for_byte. It panics if the library cannot be loaded or lacks the symbol.
func NodeFirstNamedChildForByte ¶
NodeFirstNamedChildForByte wraps ts_node_first_named_child_for_byte. It panics if the library cannot be loaded or lacks the symbol.
func NodeNamedChild ¶
NodeNamedChild wraps ts_node_named_child. It panics if the library cannot be loaded or lacks the symbol.
func NodeNamedDescendantForByteRange ¶
NodeNamedDescendantForByteRange wraps ts_node_named_descendant_for_byte_range. It panics if the library cannot be loaded or lacks the symbol.
func NodeNamedDescendantForPointRange ¶
NodeNamedDescendantForPointRange wraps ts_node_named_descendant_for_point_range. It panics if the library cannot be loaded or lacks the symbol.
func NodeNextNamedSibling ¶
NodeNextNamedSibling wraps ts_node_next_named_sibling. It panics if the library cannot be loaded or lacks the symbol.
func NodeNextSibling ¶
NodeNextSibling wraps ts_node_next_sibling. It panics if the library cannot be loaded or lacks the symbol.
func NodeParent ¶
NodeParent wraps ts_node_parent. It panics if the library cannot be loaded or lacks the symbol.
func NodePrevNamedSibling ¶
NodePrevNamedSibling wraps ts_node_prev_named_sibling. It panics if the library cannot be loaded or lacks the symbol.
func NodePrevSibling ¶
NodePrevSibling wraps ts_node_prev_sibling. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorCurrentNode ¶
func TreeCursorCurrentNode(self *TreeCursor) Node
TreeCursorCurrentNode wraps ts_tree_cursor_current_node. It panics if the library cannot be loaded or lacks the symbol.
func TreeRootNode ¶
TreeRootNode wraps ts_tree_root_node. It panics if the library cannot be loaded or lacks the symbol.
type ParseOptions ¶
ParseOptions represents TSParseOptions.
type ParseState ¶
ParseState represents TSParseState.
type Point ¶
Point represents TSPoint.
func NodeEndPoint ¶
NodeEndPoint wraps ts_node_end_point. It panics if the library cannot be loaded or lacks the symbol.
func NodeStartPoint ¶
NodeStartPoint wraps ts_node_start_point. It panics if the library cannot be loaded or lacks the symbol.
type Quantifier ¶
type Quantifier int32
Quantifier represents TSQuantifier.
const ( QuantifierZero Quantifier = 0 // must match the array initialization value QuantifierZeroOrOne Quantifier = 1 QuantifierZeroOrMore Quantifier = 2 QuantifierOne Quantifier = 3 QuantifierOneOrMore Quantifier = 4 )
func QueryCaptureQuantifierForId ¶
func QueryCaptureQuantifierForId(self Query, patternIndex uint32, captureIndex uint32) Quantifier
QueryCaptureQuantifierForId wraps ts_query_capture_quantifier_for_id. It panics if the library cannot be loaded or lacks the symbol.
func (Quantifier) String ¶
func (e Quantifier) String() string
type QueryCapture ¶
QueryCapture represents TSQueryCapture.
type QueryCursor ¶
type QueryCursor uintptr
QueryCursor is an opaque handle-like type for struct TSQueryCursor.
type QueryCursorOptions ¶
QueryCursorOptions represents TSQueryCursorOptions.
type QueryCursorState ¶
QueryCursorState represents TSQueryCursorState.
type QueryError ¶
type QueryError int32
QueryError represents TSQueryError.
const ( QueryErrorNone QueryError = 0 QueryErrorSyntax QueryError = 1 QueryErrorNodeType QueryError = 2 QueryErrorField QueryError = 3 QueryErrorCapture QueryError = 4 QueryErrorStructure QueryError = 5 QueryErrorLanguage QueryError = 6 )
func (QueryError) String ¶
func (e QueryError) String() string
type QueryMatch ¶
QueryMatch represents TSQueryMatch.
type QueryPredicateStep ¶
type QueryPredicateStep struct {
Type QueryPredicateStepType
ValueId uint32
}
QueryPredicateStep represents TSQueryPredicateStep.
type QueryPredicateStepType ¶
type QueryPredicateStepType int32
QueryPredicateStepType represents TSQueryPredicateStepType.
const ( QueryPredicateStepDone QueryPredicateStepType = 0 QueryPredicateStepCapture QueryPredicateStepType = 1 QueryPredicateStepString QueryPredicateStepType = 2 )
func (QueryPredicateStepType) String ¶
func (e QueryPredicateStepType) String() string
type StateId ¶
type StateId uint16
StateId represents TSStateId.
func LanguageNextState ¶
LanguageNextState wraps ts_language_next_state. It panics if the library cannot be loaded or lacks the symbol.
func NodeNextParseState ¶
NodeNextParseState wraps ts_node_next_parse_state. It panics if the library cannot be loaded or lacks the symbol.
func NodeParseState ¶
NodeParseState wraps ts_node_parse_state. It panics if the library cannot be loaded or lacks the symbol.
type Symbol ¶
type Symbol uint16
Symbol represents TSSymbol.
func LanguageSymbolForName ¶
LanguageSymbolForName wraps ts_language_symbol_for_name. It panics if the library cannot be loaded or lacks the symbol.
func LookaheadIteratorCurrentSymbol ¶
func LookaheadIteratorCurrentSymbol(self LookaheadIterator) Symbol
LookaheadIteratorCurrentSymbol wraps ts_lookahead_iterator_current_symbol. It panics if the library cannot be loaded or lacks the symbol.
func NodeGrammarSymbol ¶
NodeGrammarSymbol wraps ts_node_grammar_symbol. It panics if the library cannot be loaded or lacks the symbol.
func NodeSymbol ¶
NodeSymbol wraps ts_node_symbol. It panics if the library cannot be loaded or lacks the symbol.
type SymbolError ¶
type SymbolError struct {
Symbol string
}
SymbolError reports that a symbol is absent from the loaded library, which happens when the installed version predates the symbol.
func (*SymbolError) Error ¶
func (e *SymbolError) Error() string
type SymbolType ¶
type SymbolType int32
SymbolType represents TSSymbolType.
const ( SymbolRegular SymbolType = 0 SymbolAnonymous SymbolType = 1 SymbolSupertype SymbolType = 2 SymbolAuxiliary SymbolType = 3 )
func LanguageSymbolType ¶
func LanguageSymbolType(self Language, symbol Symbol) SymbolType
LanguageSymbolType wraps ts_language_symbol_type. It panics if the library cannot be loaded or lacks the symbol.
func (SymbolType) String ¶
func (e SymbolType) String() string
type TreeCursor ¶
TreeCursor represents TSTreeCursor.
func TreeCursorCopy ¶
func TreeCursorCopy(cursor *TreeCursor) TreeCursor
TreeCursorCopy wraps ts_tree_cursor_copy. It panics if the library cannot be loaded or lacks the symbol.
func TreeCursorNew ¶
func TreeCursorNew(node Node) TreeCursor
TreeCursorNew wraps ts_tree_cursor_new. It panics if the library cannot be loaded or lacks the symbol.
type WasmEngine ¶
type WasmEngine struct{}
WasmEngine is a placeholder for unresolved C type TSWasmEngine.
type WasmError ¶
type WasmError struct {
Kind WasmErrorKind
Message uintptr
}
WasmError represents TSWasmError.
type WasmErrorKind ¶
type WasmErrorKind int32
WasmErrorKind represents TSWasmErrorKind.
const ( WasmErrorNone WasmErrorKind = 0 WasmErrorParse WasmErrorKind = 1 WasmErrorCompile WasmErrorKind = 2 WasmErrorInstantiate WasmErrorKind = 3 WasmErrorAllocate WasmErrorKind = 4 )
func (WasmErrorKind) String ¶
func (e WasmErrorKind) String() string