Safe Haskell | None |
---|---|
Language | Haskell2010 |
TreeSitter.Internal
Synopsis
- type TREE_SITTER_LANGUAGE_VERSION = 14
- type TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION = 13
- newtype Symbol = WrapTSSymbol {}
- newtype StateId = WrapTSStateId {}
- newtype GrammarType = WrapTSGrammarType {}
- newtype FieldId = WrapTSFieldId {}
- newtype FieldName = WrapTSFieldName {}
- newtype CaptureName = WrapTSCaptureName {}
- newtype CaptureIndex = WrapTSCaptureIndex {}
- newtype PatternIndex = WrapTSPatternIndex {}
- data Language
- data Parser
- data Tree
- data Query
- data QueryCursor
- data LookaheadIterator
- data InputEncoding where
- pattern InputEncodingUTF8 :: InputEncoding
- pattern InputEncodingUTF16 :: InputEncoding
- data SymbolType where
- pattern SymbolTypeRegular :: SymbolType
- pattern SymbolTypeAnonymous :: SymbolType
- pattern SymbolTypeSupertype :: SymbolType
- pattern SymbolTypeAuxiliary :: SymbolType
- data Point where
- data Range where
- type Input = Word32 -> Point -> IO ByteString
- data LogType where
- pattern LogTypeLex :: LogType
- pattern LogTypeParse :: LogType
- data InputEdit where
- data Node
- newtype NodeId = WrapTSNodeId {}
- nodeId :: Node -> NodeId
- data TreeCursor
- newtype TreeCursorId = WrapTSTreeCursorId {}
- data QueryCapture
- data Quantifier
- data QueryMatch
- data QueryPredicateStepType
- data QueryPredicateStep
- data QueryErrorType where
- pattern QueryErrorTypeSyntax :: QueryErrorType
- pattern QueryErrorTypeNodeType :: QueryErrorType
- pattern QueryErrorTypeField :: QueryErrorType
- pattern QueryErrorTypeCapture :: QueryErrorType
- pattern QueryErrorTypeStructure :: QueryErrorType
- pattern QueryErrorTypeLanguage :: QueryErrorType
- data QueryError = QueryError {}
- parserNew :: IO Parser
- unsafeParserDelete :: Parser -> IO ()
- withParser :: (Parser -> IO a) -> IO a
- parserSetLanguage :: Parser -> Language -> IO Bool
- parserLanguage :: Parser -> IO Language
- parserSetIncludedRanges :: Parser -> [Range] -> IO Bool
- parserIncludedRanges :: Parser -> IO [Range]
- parserSetLogger :: Parser -> Log -> IO ()
- parserLogger :: Parser -> IO (Maybe Log)
- parserHasLogger :: Parser -> IO Bool
- parserRemoveLogger :: Parser -> IO (Maybe Log)
- parserParse :: Parser -> Maybe Tree -> Input -> InputEncoding -> IO (Maybe Tree)
- parserParseString :: Parser -> Maybe Tree -> String -> IO (Maybe Tree)
- parserParseByteString :: Parser -> Maybe Tree -> ByteString -> IO (Maybe Tree)
- parserParseByteStringWithEncoding :: Parser -> Maybe Tree -> ByteString -> InputEncoding -> IO (Maybe Tree)
- parserReset :: Parser -> IO ()
- newtype Microsecond = Microsecond {}
- parserSetTimeoutMicros :: Parser -> Microsecond -> IO ()
- parserTimeoutMicros :: Parser -> IO Microsecond
- data CancellationFlag where
- pattern Cancel :: CancellationFlag
- pattern Continue :: CancellationFlag
- data CancellationFlagRef
- getCancellationFlag :: CancellationFlagRef -> IO CancellationFlag
- putCancellationFlag :: CancellationFlagRef -> CancellationFlag -> IO ()
- parserSetCancellationFlag :: Parser -> CancellationFlagRef -> IO ()
- parserCancellationFlag :: Parser -> IO CancellationFlagRef
- parserPrintDotGraphs :: Parser -> Handle -> IO ()
- treeCopy :: Tree -> IO Tree
- unsafeTreeDelete :: Tree -> IO ()
- treeRootNode :: Tree -> IO Node
- treeRootNodeWithOffset :: Tree -> Word32 -> Point -> IO Node
- treeLanguage :: Tree -> IO Language
- treeIncludedRanges :: Tree -> IO [Range]
- treeEdit :: Tree -> InputEdit -> IO ()
- treeGetChangedRanges :: Tree -> Tree -> IO [Range]
- treePrintDotGraph :: Tree -> Handle -> IO ()
- nodeType :: Node -> IO ByteString
- nodeTypeAsString :: Node -> IO String
- nodeSymbol :: Node -> IO Symbol
- nodeLanguage :: Node -> IO Language
- nodeGrammarType :: Node -> IO GrammarType
- nodeGrammarTypeAsString :: Node -> IO String
- nodeGrammarSymbol :: Node -> IO Symbol
- nodeRange :: Node -> IO Range
- nodeStartByte :: Node -> IO Word32
- nodeStartPoint :: Node -> IO Point
- nodeEndByte :: Node -> IO Word32
- nodeEndPoint :: Node -> IO Point
- showNode :: Node -> IO ByteString
- showNodeAsString :: Node -> IO String
- nodeIsNull :: Node -> IO Bool
- nodeIsNamed :: Node -> IO Bool
- nodeIsMissing :: Node -> IO Bool
- nodeIsExtra :: Node -> IO Bool
- nodeHasChanges :: Node -> IO Bool
- nodeHasError :: Node -> IO Bool
- nodeIsError :: Node -> IO Bool
- nodeParseState :: Node -> IO StateId
- nodeNextParseState :: Node -> IO StateId
- nodeParent :: Node -> IO Node
- nodeChildWithDescendant :: Node -> Node -> IO Node
- nodeChild :: Node -> Word32 -> IO Node
- nodeFieldNameForChild :: Node -> Word32 -> IO FieldName
- nodeFieldNameForChildAsString :: Node -> Word32 -> IO String
- nodeFieldNameForNamedChild :: Node -> Word32 -> IO FieldName
- nodeFieldNameForNamedChildAsString :: Node -> Word32 -> IO String
- nodeChildCount :: Node -> IO Word32
- nodeNamedChild :: Node -> Word32 -> IO Node
- nodeNamedChildCount :: Node -> IO Word32
- nodeChildByFieldName :: Node -> FieldName -> IO Node
- nodeChildByFieldId :: Node -> FieldId -> IO Node
- nodeNextSibling :: Node -> IO Node
- nodePrevSibling :: Node -> IO Node
- nodeNextNamedSibling :: Node -> IO Node
- nodePrevNamedSibling :: Node -> IO Node
- nodeFirstChildForByte :: Node -> Word32 -> IO Node
- nodeFirstNamedChildForByte :: Node -> Word32 -> IO Node
- nodeDescendantCount :: Node -> IO Word32
- nodeDescendantForByteRange :: Node -> Word32 -> Word32 -> IO Node
- nodeDescendantForPointRange :: Node -> Point -> Point -> IO Node
- nodeNamedDescendantForByteRange :: Node -> Word32 -> Word32 -> IO Node
- nodeNamedDescendantForPointRange :: Node -> Point -> Point -> IO Node
- nodeEdit :: Node -> InputEdit -> IO ()
- nodeEq :: Node -> Node -> IO Bool
- treeCursorNew :: Node -> IO TreeCursor
- unsafeTreeCursorDelete :: TreeCursor -> IO ()
- treeCursorReset :: TreeCursor -> Node -> IO ()
- treeCursorResetTo :: TreeCursor -> TreeCursor -> IO ()
- treeCursorCurrentNode :: TreeCursor -> IO Node
- treeCursorCurrentFieldName :: TreeCursor -> IO (Maybe ByteString)
- treeCursorCurrentFieldId :: TreeCursor -> IO (Maybe FieldId)
- treeCursorGotoParent :: TreeCursor -> IO Bool
- treeCursorGotoNextSibling :: TreeCursor -> IO Bool
- treeCursorGotoPreviousSibling :: TreeCursor -> IO Bool
- treeCursorGotoFirstChild :: TreeCursor -> IO Bool
- treeCursorGotoLastChild :: TreeCursor -> IO Bool
- treeCursorGotoDescendant :: TreeCursor -> Word32 -> IO ()
- treeCursorCurrentDescendantIndex :: TreeCursor -> IO Word32
- treeCursorCurrentDepth :: TreeCursor -> IO Word32
- treeCursorGotoFirstChildForByte :: TreeCursor -> Word32 -> IO Int64
- treeCursorGotoFirstChildForPoint :: TreeCursor -> Point -> IO Int64
- treeCursorCopy :: TreeCursor -> IO TreeCursor
- queryNew :: Language -> ByteString -> IO Query
- unsafeQueryDelete :: Query -> IO ()
- queryPatternCount :: Query -> IO Word32
- queryCaptureCount :: Query -> IO Word32
- queryStringCount :: Query -> IO Word32
- queryStartByteForPattern :: Query -> PatternIndex -> IO Word32
- queryEndByteForPattern :: Query -> PatternIndex -> IO Word32
- queryPredicatesForPattern :: Query -> Word32 -> IO [QueryPredicateStep]
- queryIsPatternRooted :: Query -> PatternIndex -> IO Bool
- queryIsPatternNonLocal :: Query -> PatternIndex -> IO Bool
- queryIsPatternGuaranteedAtStep :: Query -> Word32 -> IO Bool
- queryCaptureNameForIndex :: Query -> CaptureIndex -> IO CaptureName
- queryCaptureQuantifierForIndex :: Query -> PatternIndex -> CaptureIndex -> IO Quantifier
- queryStringValueForIndex :: Query -> CaptureIndex -> IO ByteString
- queryDisableCapture :: Query -> CaptureName -> IO ()
- queryDisablePattern :: Query -> PatternIndex -> IO ()
- queryCursorNew :: IO QueryCursor
- unsafeQueryCursorDelete :: QueryCursor -> IO ()
- queryCursorExec :: QueryCursor -> Query -> Node -> IO ()
- queryCursorDidExceedMatchLimit :: QueryCursor -> IO Bool
- queryCursorMatchLimit :: QueryCursor -> IO Word32
- queryCursorSetMatchLimit :: QueryCursor -> Word32 -> IO ()
- queryCursorSetTimeoutMicros :: QueryCursor -> Microsecond -> IO ()
- queryCursorTimeoutMicros :: QueryCursor -> IO Microsecond
- queryCursorSetByteRange :: QueryCursor -> Word32 -> Word32 -> IO ()
- queryCursorSetPointRange :: QueryCursor -> Point -> Point -> IO ()
- queryCursorNextMatch :: QueryCursor -> IO (Maybe QueryMatch)
- queryCursorRemoveMatch :: QueryCursor -> CaptureIndex -> IO ()
- queryCursorNextCapture :: QueryCursor -> IO (Maybe (CaptureIndex, QueryMatch))
- queryCursorSetMaxStartDepth :: QueryCursor -> Word32 -> IO ()
- unsafeToLanguage :: ConstPtr tsLanguage -> IO Language
- unsafeLanguageDelete :: Language -> IO ()
- languageCopy :: Language -> IO Language
- languageSymbolCount :: Language -> IO Word32
- languageStateCount :: Language -> IO Word32
- languageSymbolName :: Language -> Symbol -> IO ByteString
- languageSymbolForGrammarType :: Language -> ByteString -> Bool -> IO Symbol
- languageFieldCount :: Language -> IO Word32
- languageFieldNameForId :: Language -> FieldId -> IO ByteString
- languageFieldIdForName :: Language -> ByteString -> IO FieldId
- languageSymbolType :: Language -> Symbol -> IO SymbolType
- languageVersion :: Language -> IO Word32
- languageNextState :: Language -> StateId -> Symbol -> IO StateId
- withLookaheadIteratorAsTSLookaheadIteratorPtr :: LookaheadIterator -> (ConstPtr TSLookaheadIterator -> IO a) -> IO a
- lookaheadIteratorNew :: Language -> StateId -> IO LookaheadIterator
- unsafeLookaheadIteratorDelete :: LookaheadIterator -> IO ()
- lookaheadIteratorResetState :: LookaheadIterator -> StateId -> IO Bool
- lookaheadIteratorReset :: LookaheadIterator -> Language -> StateId -> IO Bool
- lookaheadIteratorLanguage :: LookaheadIterator -> IO Language
- lookaheadIteratorNext :: LookaheadIterator -> IO Bool
- lookaheadIteratorCurrentSymbol :: LookaheadIterator -> IO Symbol
- lookaheadIteratorCurrentSymbolName :: LookaheadIterator -> IO ByteString
ABI Versioning
type TREE_SITTER_LANGUAGE_VERSION = 14 #
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. The Tree-sitter library is generally backwards-compatible with languages generated using older CLI versions, but is not forwards-compatible.
#define TREE_SITTER_LANGUAGE_VERSION 14
type TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION = 13 #
The earliest ABI version that is supported by the current version of the library.
#define TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION 13
Types
Constructors
WrapTSSymbol | |
Fields |
Instances
Enum Symbol Source # | |
Defined in TreeSitter.Internal | |
Num Symbol Source # | |
Read Symbol Source # | |
Integral Symbol Source # | |
Defined in TreeSitter.Internal | |
Real Symbol Source # | |
Defined in TreeSitter.Internal Methods toRational :: Symbol -> Rational # | |
Show Symbol Source # | |
Eq Symbol Source # | |
Ord Symbol Source # | |
Constructors
WrapTSStateId | |
Fields |
Instances
Enum StateId Source # | |
Num StateId Source # | |
Read StateId Source # | |
Integral StateId Source # | |
Defined in TreeSitter.Internal | |
Real StateId Source # | |
Defined in TreeSitter.Internal Methods toRational :: StateId -> Rational # | |
Show StateId Source # | |
Eq StateId Source # | |
Ord StateId Source # | |
newtype GrammarType Source #
Constructors
WrapTSGrammarType | |
Fields |
Instances
Read GrammarType Source # | |
Defined in TreeSitter.Internal Methods readsPrec :: Int -> ReadS GrammarType # readList :: ReadS [GrammarType] # readPrec :: ReadPrec GrammarType # readListPrec :: ReadPrec [GrammarType] # | |
Show GrammarType Source # | |
Defined in TreeSitter.Internal Methods showsPrec :: Int -> GrammarType -> ShowS # show :: GrammarType -> String # showList :: [GrammarType] -> ShowS # | |
Eq GrammarType Source # | |
Defined in TreeSitter.Internal | |
Ord GrammarType Source # | |
Defined in TreeSitter.Internal Methods compare :: GrammarType -> GrammarType -> Ordering # (<) :: GrammarType -> GrammarType -> Bool # (<=) :: GrammarType -> GrammarType -> Bool # (>) :: GrammarType -> GrammarType -> Bool # (>=) :: GrammarType -> GrammarType -> Bool # max :: GrammarType -> GrammarType -> GrammarType # min :: GrammarType -> GrammarType -> GrammarType # |
Constructors
WrapTSFieldId | |
Fields |
Instances
Enum FieldId Source # | |
Num FieldId Source # | |
Read FieldId Source # | |
Integral FieldId Source # | |
Defined in TreeSitter.Internal | |
Real FieldId Source # | |
Defined in TreeSitter.Internal Methods toRational :: FieldId -> Rational # | |
Show FieldId Source # | |
Eq FieldId Source # | |
Ord FieldId Source # | |
Constructors
WrapTSFieldName | |
Fields |
Instances
Read FieldName Source # | |
Show FieldName Source # | |
Eq FieldName Source # | |
Ord FieldName Source # | |
newtype CaptureName Source #
Constructors
WrapTSCaptureName | |
Fields |
Instances
Read CaptureName Source # | |
Defined in TreeSitter.Internal Methods readsPrec :: Int -> ReadS CaptureName # readList :: ReadS [CaptureName] # readPrec :: ReadPrec CaptureName # readListPrec :: ReadPrec [CaptureName] # | |
Show CaptureName Source # | |
Defined in TreeSitter.Internal Methods showsPrec :: Int -> CaptureName -> ShowS # show :: CaptureName -> String # showList :: [CaptureName] -> ShowS # | |
Eq CaptureName Source # | |
Defined in TreeSitter.Internal | |
Ord CaptureName Source # | |
Defined in TreeSitter.Internal Methods compare :: CaptureName -> CaptureName -> Ordering # (<) :: CaptureName -> CaptureName -> Bool # (<=) :: CaptureName -> CaptureName -> Bool # (>) :: CaptureName -> CaptureName -> Bool # (>=) :: CaptureName -> CaptureName -> Bool # max :: CaptureName -> CaptureName -> CaptureName # min :: CaptureName -> CaptureName -> CaptureName # |
newtype CaptureIndex Source #
Constructors
WrapTSCaptureIndex | |
Fields |
newtype PatternIndex Source #
Constructors
WrapTSPatternIndex | |
Fields |
data QueryCursor Source #
data LookaheadIterator Source #
data InputEncoding where Source #
Bundled Patterns
pattern InputEncodingUTF8 :: InputEncoding | |
pattern InputEncodingUTF16 :: InputEncoding |
Instances
Show InputEncoding Source # | |
Defined in TreeSitter.Internal Methods showsPrec :: Int -> InputEncoding -> ShowS # show :: InputEncoding -> String # showList :: [InputEncoding] -> ShowS # |
data SymbolType where Source #
Bundled Patterns
pattern SymbolTypeRegular :: SymbolType | |
pattern SymbolTypeAnonymous :: SymbolType | |
pattern SymbolTypeSupertype :: SymbolType | |
pattern SymbolTypeAuxiliary :: SymbolType |
Instances
Show SymbolType Source # | |
Defined in TreeSitter.Internal Methods showsPrec :: Int -> SymbolType -> ShowS # show :: SymbolType -> String # showList :: [SymbolType] -> ShowS # | |
Eq SymbolType Source # | |
Defined in TreeSitter.Internal |
Bundled Patterns
pattern LogTypeLex :: LogType | |
pattern LogTypeParse :: LogType |
Constructors
WrapTSNodeId | |
Fields |
data TreeCursor Source #
newtype TreeCursorId Source #
Constructors
WrapTSTreeCursorId | |
Fields |
Instances
Eq TreeCursorId Source # | |
Defined in TreeSitter.Internal | |
Ord TreeCursorId Source # | |
Defined in TreeSitter.Internal Methods compare :: TreeCursorId -> TreeCursorId -> Ordering # (<) :: TreeCursorId -> TreeCursorId -> Bool # (<=) :: TreeCursorId -> TreeCursorId -> Bool # (>) :: TreeCursorId -> TreeCursorId -> Bool # (>=) :: TreeCursorId -> TreeCursorId -> Bool # max :: TreeCursorId -> TreeCursorId -> TreeCursorId # min :: TreeCursorId -> TreeCursorId -> TreeCursorId # |
data QueryCapture Source #
data Quantifier Source #
Instances
Show Quantifier Source # | |
Defined in TreeSitter.Internal Methods showsPrec :: Int -> Quantifier -> ShowS # show :: Quantifier -> String # showList :: [Quantifier] -> ShowS # | |
Eq Quantifier Source # | |
Defined in TreeSitter.Internal |
data QueryMatch Source #
data QueryPredicateStepType Source #
Instances
Show QueryPredicateStepType Source # | |
Defined in TreeSitter.Internal Methods showsPrec :: Int -> QueryPredicateStepType -> ShowS # show :: QueryPredicateStepType -> String # showList :: [QueryPredicateStepType] -> ShowS # | |
Eq QueryPredicateStepType Source # | |
Defined in TreeSitter.Internal Methods (==) :: QueryPredicateStepType -> QueryPredicateStepType -> Bool # (/=) :: QueryPredicateStepType -> QueryPredicateStepType -> Bool # |
data QueryPredicateStep Source #
data QueryErrorType where Source #
Bundled Patterns
pattern QueryErrorTypeSyntax :: QueryErrorType | |
pattern QueryErrorTypeNodeType :: QueryErrorType | |
pattern QueryErrorTypeField :: QueryErrorType | |
pattern QueryErrorTypeCapture :: QueryErrorType | |
pattern QueryErrorTypeStructure :: QueryErrorType | |
pattern QueryErrorTypeLanguage :: QueryErrorType |
Instances
Show QueryErrorType Source # | |
Defined in TreeSitter.Internal Methods showsPrec :: Int -> QueryErrorType -> ShowS # show :: QueryErrorType -> String # showList :: [QueryErrorType] -> ShowS # | |
Eq QueryErrorType Source # | |
Defined in TreeSitter.Internal Methods (==) :: QueryErrorType -> QueryErrorType -> Bool # (/=) :: QueryErrorType -> QueryErrorType -> Bool # |
data QueryError Source #
Constructors
QueryError | |
Fields |
Instances
Exception QueryError Source # | |
Defined in TreeSitter.Internal Methods toException :: QueryError -> SomeException # fromException :: SomeException -> Maybe QueryError # displayException :: QueryError -> String # | |
Show QueryError Source # | |
Defined in TreeSitter.Internal Methods showsPrec :: Int -> QueryError -> ShowS # show :: QueryError -> String # showList :: [QueryError] -> ShowS # |
Parser
unsafeParserDelete :: Parser -> IO () Source #
Delete the Parser
and free the associated memory.
See
.ts_parser_delete
Warning: Using the Parser
after calling unsafeParserDelete
leads to undefined behaviour.
Warning: If the Parser
has a logger, this function does not delete it.
parserLanguage :: Parser -> IO Language Source #
See
.ts_parser_language
parserSetLogger :: Parser -> Log -> IO () Source #
Set the Logger
for a Parser
.
See
.ts_parser_set_logger
parserLogger :: Parser -> IO (Maybe Log) Source #
Get the Logger
for a Parser
.
If no Logger
was set, parserLogger
returns Nothing
.
See
.ts_parser_logger
parserRemoveLogger :: Parser -> IO (Maybe Log) Source #
If the Parser
has a Logger
, remove and pure it.
parserParse :: Parser -> Maybe Tree -> Input -> InputEncoding -> IO (Maybe Tree) Source #
See
.ts_parser_parse
parserParseByteString :: Parser -> Maybe Tree -> ByteString -> IO (Maybe Tree) Source #
parserParseByteStringWithEncoding :: Parser -> Maybe Tree -> ByteString -> InputEncoding -> IO (Maybe Tree) Source #
parserReset :: Parser -> IO () Source #
See
.ts_parser_reset
newtype Microsecond Source #
Microseconds.
Constructors
Microsecond | |
Fields |
Instances
parserSetTimeoutMicros :: Parser -> Microsecond -> IO () Source #
data CancellationFlag where Source #
Bundled Patterns
pattern Cancel :: CancellationFlag | |
pattern Continue :: CancellationFlag |
data CancellationFlagRef Source #
putCancellationFlag :: CancellationFlagRef -> CancellationFlag -> IO () Source #
parserSetCancellationFlag :: Parser -> CancellationFlagRef -> IO () Source #
parserPrintDotGraphs :: Parser -> Handle -> IO () Source #
See
.
| This function throws an ts_parser_print_dot_graphs
IOError
if the Handle
does not reference a file descriptor.
Tree
unsafeTreeDelete :: Tree -> IO () Source #
Delete the Tree
.
See
.ts_tree_delete
Warning: Using the Tree
after calling unsafeTreeDelete
leads to undefined behaviour.
treeRootNode :: Tree -> IO Node Source #
See
.ts_tree_root_node
treeLanguage :: Tree -> IO Language Source #
See
.ts_tree_language
treePrintDotGraph :: Tree -> Handle -> IO () Source #
See
.
| This function throws an ts_tree_print_dot_graph
IOError
if the Handle
does not reference a file descriptor.
Node
nodeType :: Node -> IO ByteString Source #
See
.ts_node_type
nodeTypeAsString :: Node -> IO String Source #
See
.ts_node_type
nodeSymbol :: Node -> IO Symbol Source #
See
.ts_node_symbol
nodeLanguage :: Node -> IO Language Source #
See
.ts_node_language
nodeGrammarType :: Node -> IO GrammarType Source #
See
.ts_node_grammar_type
nodeGrammarTypeAsString :: Node -> IO String Source #
See
.ts_node_grammar_type
nodeStartByte :: Node -> IO Word32 Source #
See
.ts_node_start_byte
nodeStartPoint :: Node -> IO Point Source #
See
.ts_node_start_point
nodeEndByte :: Node -> IO Word32 Source #
See
.ts_node_end_byte
nodeEndPoint :: Node -> IO Point Source #
See
.ts_node_end_point
showNode :: Node -> IO ByteString Source #
See
.ts_node_string
showNodeAsString :: Node -> IO String Source #
See
.ts_node_string
nodeIsNull :: Node -> IO Bool Source #
See
.ts_node_is_null
nodeIsNamed :: Node -> IO Bool Source #
See
.ts_node_is_named
nodeIsMissing :: Node -> IO Bool Source #
See
.ts_node_is_missing
nodeIsExtra :: Node -> IO Bool Source #
See
.ts_node_is_extra
nodeHasChanges :: Node -> IO Bool Source #
See
.ts_node_has_changes
nodeHasError :: Node -> IO Bool Source #
See
.ts_node_has_error
nodeIsError :: Node -> IO Bool Source #
See
.ts_node_is_error
nodeParseState :: Node -> IO StateId Source #
See
.ts_node_parse_state
nodeParent :: Node -> IO Node Source #
See
.ts_node_parent
nodeChildCount :: Node -> IO Word32 Source #
See
.ts_node_child_count
nodeNamedChild :: Node -> Word32 -> IO Node Source #
See
.ts_node_named_child
nodeNextSibling :: Node -> IO Node Source #
See
.ts_node_next_sibling
nodePrevSibling :: Node -> IO Node Source #
See
.ts_node_prev_sibling
TreeCursor
treeCursorNew :: Node -> IO TreeCursor Source #
See
.ts_tree_cursor_new
unsafeTreeCursorDelete :: TreeCursor -> IO () Source #
Delete the TreeCursor
.
| See
.ts_tree_cursor_delete
Warning: Using the Tree
after calling unsafeTreeCursorDelete
leads to undefined behaviour.
treeCursorReset :: TreeCursor -> Node -> IO () Source #
See
.ts_tree_cursor_reset
treeCursorResetTo :: TreeCursor -> TreeCursor -> IO () Source #
treeCursorCurrentFieldId :: TreeCursor -> IO (Maybe FieldId) Source #
treeCursorGotoDescendant :: TreeCursor -> Word32 -> IO () Source #
treeCursorCopy :: TreeCursor -> IO TreeCursor Source #
See
.ts_tree_cursor_copy
Query
queryNew :: Language -> ByteString -> IO Query Source #
See
.ts_query_new
unsafeQueryDelete :: Query -> IO () Source #
Delete the Query
and free the associated memory.
See
.ts_query_delete
Warning: Using the Query
after calling unsafeQueryDelete
leads to undefined behaviour.
queryStartByteForPattern :: Query -> PatternIndex -> IO Word32 Source #
queryEndByteForPattern :: Query -> PatternIndex -> IO Word32 Source #
queryPredicatesForPattern :: Query -> Word32 -> IO [QueryPredicateStep] Source #
queryIsPatternRooted :: Query -> PatternIndex -> IO Bool Source #
queryIsPatternNonLocal :: Query -> PatternIndex -> IO Bool Source #
queryStringValueForIndex :: Query -> CaptureIndex -> IO ByteString Source #
queryDisableCapture :: Query -> CaptureName -> IO () Source #
queryDisablePattern :: Query -> PatternIndex -> IO () Source #
unsafeQueryCursorDelete :: QueryCursor -> IO () Source #
queryCursorExec :: QueryCursor -> Query -> Node -> IO () Source #
See
.ts_query_cursor_exec
queryCursorSetMatchLimit :: QueryCursor -> Word32 -> IO () Source #
queryCursorSetTimeoutMicros :: QueryCursor -> Microsecond -> IO () Source #
queryCursorSetByteRange :: QueryCursor -> Word32 -> Word32 -> IO () Source #
queryCursorSetPointRange :: QueryCursor -> Point -> Point -> IO () Source #
queryCursorNextMatch :: QueryCursor -> IO (Maybe QueryMatch) Source #
queryCursorRemoveMatch :: QueryCursor -> CaptureIndex -> IO () Source #
queryCursorNextCapture :: QueryCursor -> IO (Maybe (CaptureIndex, QueryMatch)) Source #
queryCursorSetMaxStartDepth :: QueryCursor -> Word32 -> IO () Source #
Language
unsafeLanguageDelete :: Language -> IO () Source #
languageCopy :: Language -> IO Language Source #
See
.ts_language_copy
languageSymbolName :: Language -> Symbol -> IO ByteString Source #
languageSymbolForGrammarType :: Language -> ByteString -> Bool -> IO Symbol Source #
languageFieldNameForId :: Language -> FieldId -> IO ByteString Source #
languageFieldIdForName :: Language -> ByteString -> IO FieldId Source #
languageSymbolType :: Language -> Symbol -> IO SymbolType Source #
languageVersion :: Language -> IO Word32 Source #
See
.ts_language_version
Lookahead Iterator
withLookaheadIteratorAsTSLookaheadIteratorPtr :: LookaheadIterator -> (ConstPtr TSLookaheadIterator -> IO a) -> IO a Source #
unsafeLookaheadIteratorDelete :: LookaheadIterator -> IO () Source #
See
.ts_lookahead_iterator_delete
Warning: Using the LookaheadIterator
after calling unsafeLookaheadIteratorDelete
leads to undefined behaviour.
lookaheadIteratorReset :: LookaheadIterator -> Language -> StateId -> IO Bool Source #