hs-tree-sitter-13.0.14.0: High-level bindings for tree-sitter
Safe HaskellNone
LanguageHaskell2010

TreeSitter.Internal

Synopsis

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

newtype Symbol Source #

Constructors

WrapTSSymbol 

Instances

Instances details
Enum Symbol Source # 
Instance details

Defined in TreeSitter.Internal

Num Symbol Source # 
Instance details

Defined in TreeSitter.Internal

Read Symbol Source # 
Instance details

Defined in TreeSitter.Internal

Integral Symbol Source # 
Instance details

Defined in TreeSitter.Internal

Real Symbol Source # 
Instance details

Defined in TreeSitter.Internal

Show Symbol Source # 
Instance details

Defined in TreeSitter.Internal

Eq Symbol Source # 
Instance details

Defined in TreeSitter.Internal

Methods

(==) :: Symbol -> Symbol -> Bool #

(/=) :: Symbol -> Symbol -> Bool #

Ord Symbol Source # 
Instance details

Defined in TreeSitter.Internal

newtype StateId Source #

Constructors

WrapTSStateId 

Instances

Instances details
Enum StateId Source # 
Instance details

Defined in TreeSitter.Internal

Num StateId Source # 
Instance details

Defined in TreeSitter.Internal

Read StateId Source # 
Instance details

Defined in TreeSitter.Internal

Integral StateId Source # 
Instance details

Defined in TreeSitter.Internal

Real StateId Source # 
Instance details

Defined in TreeSitter.Internal

Show StateId Source # 
Instance details

Defined in TreeSitter.Internal

Eq StateId Source # 
Instance details

Defined in TreeSitter.Internal

Methods

(==) :: StateId -> StateId -> Bool #

(/=) :: StateId -> StateId -> Bool #

Ord StateId Source # 
Instance details

Defined in TreeSitter.Internal

newtype FieldId Source #

Constructors

WrapTSFieldId 

Instances

Instances details
Enum FieldId Source # 
Instance details

Defined in TreeSitter.Internal

Num FieldId Source # 
Instance details

Defined in TreeSitter.Internal

Read FieldId Source # 
Instance details

Defined in TreeSitter.Internal

Integral FieldId Source # 
Instance details

Defined in TreeSitter.Internal

Real FieldId Source # 
Instance details

Defined in TreeSitter.Internal

Show FieldId Source # 
Instance details

Defined in TreeSitter.Internal

Eq FieldId Source # 
Instance details

Defined in TreeSitter.Internal

Methods

(==) :: FieldId -> FieldId -> Bool #

(/=) :: FieldId -> FieldId -> Bool #

Ord FieldId Source # 
Instance details

Defined in TreeSitter.Internal

data Tree Source #

Warning: Tree is not thread-safe. To use a Tree from multiple threads, you must copy it using treeCopy.

data InputEncoding where Source #

Bundled Patterns

pattern InputEncodingUTF8 :: InputEncoding 
pattern InputEncodingUTF16 :: InputEncoding 

Instances

Instances details
Show InputEncoding Source # 
Instance details

Defined in TreeSitter.Internal

data SymbolType where Source #

Instances

Instances details
Show SymbolType Source # 
Instance details

Defined in TreeSitter.Internal

Eq SymbolType Source # 
Instance details

Defined in TreeSitter.Internal

data Point where Source #

Bundled Patterns

pattern Point :: Word32 -> Word32 -> Point 

Instances

Instances details
Show Point Source # 
Instance details

Defined in TreeSitter.Internal

Methods

showsPrec :: Int -> Point -> ShowS #

show :: Point -> String #

showList :: [Point] -> ShowS #

Eq Point Source # 
Instance details

Defined in TreeSitter.Internal

Methods

(==) :: Point -> Point -> Bool #

(/=) :: Point -> Point -> Bool #

Ord Point Source # 
Instance details

Defined in TreeSitter.Internal

Methods

compare :: Point -> Point -> Ordering #

(<) :: Point -> Point -> Bool #

(<=) :: Point -> Point -> Bool #

(>) :: Point -> Point -> Bool #

(>=) :: Point -> Point -> Bool #

max :: Point -> Point -> Point #

min :: Point -> Point -> Point #

data Range where Source #

Bundled Patterns

pattern Range :: Point -> Point -> Word32 -> Word32 -> Range 

Instances

Instances details
Show Range Source # 
Instance details

Defined in TreeSitter.Internal

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Eq Range Source # 
Instance details

Defined in TreeSitter.Internal

Methods

(==) :: Range -> Range -> Bool #

(/=) :: Range -> Range -> Bool #

type Input Source #

Arguments

 = Word32

Byte index.

-> Point

Position.

-> IO ByteString 

data LogType where Source #

Bundled Patterns

pattern LogTypeLex :: LogType 
pattern LogTypeParse :: LogType 

Instances

Instances details
Show LogType Source # 
Instance details

Defined in TreeSitter.Internal

Eq LogType Source # 
Instance details

Defined in TreeSitter.Internal

Methods

(==) :: LogType -> LogType -> Bool #

(/=) :: LogType -> LogType -> Bool #

data InputEdit where Source #

Bundled Patterns

pattern InputEdit :: Word32 -> Word32 -> Word32 -> Point -> Point -> Point -> InputEdit 

newtype NodeId Source #

Constructors

WrapTSNodeId 

Fields

Instances

Instances details
Show NodeId Source # 
Instance details

Defined in TreeSitter.Internal

Eq NodeId Source # 
Instance details

Defined in TreeSitter.Internal

Methods

(==) :: NodeId -> NodeId -> Bool #

(/=) :: NodeId -> NodeId -> Bool #

Ord NodeId Source # 
Instance details

Defined in TreeSitter.Internal

data Quantifier Source #

Instances

Instances details
Show Quantifier Source # 
Instance details

Defined in TreeSitter.Internal

Eq Quantifier Source # 
Instance details

Defined in TreeSitter.Internal

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.

withParser :: (Parser -> IO a) -> IO a Source #

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.

parserHasLogger :: Parser -> IO Bool Source #

Test if the Parser has a Logger.

parserRemoveLogger :: Parser -> IO (Maybe Log) Source #

If the Parser has a Logger, remove and pure it.

newtype Microsecond Source #

Microseconds.

Constructors

Microsecond 

Instances

Instances details
Enum Microsecond Source # 
Instance details

Defined in TreeSitter.Internal

Num Microsecond Source # 
Instance details

Defined in TreeSitter.Internal

Read Microsecond Source # 
Instance details

Defined in TreeSitter.Internal

Integral Microsecond Source # 
Instance details

Defined in TreeSitter.Internal

Real Microsecond Source # 
Instance details

Defined in TreeSitter.Internal

Show Microsecond Source # 
Instance details

Defined in TreeSitter.Internal

Eq Microsecond Source # 
Instance details

Defined in TreeSitter.Internal

Ord Microsecond Source # 
Instance details

Defined in TreeSitter.Internal

data CancellationFlag where Source #

Bundled Patterns

pattern Cancel :: CancellationFlag 
pattern Continue :: CancellationFlag 

parserPrintDotGraphs :: Parser -> Handle -> IO () Source #

See ts_parser_print_dot_graphs. | This function throws an 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.

treePrintDotGraph :: Tree -> Handle -> IO () Source #

See ts_tree_print_dot_graph. | This function throws an IOError if the Handle does not reference a file descriptor.

Node

nodeRange :: Node -> IO Range Source #

Get the Range for the Node.

TreeCursor

unsafeTreeCursorDelete :: TreeCursor -> IO () Source #

Delete the TreeCursor.

| See ts_tree_cursor_delete.

Warning: Using the Tree after calling unsafeTreeCursorDelete leads to undefined behaviour.

Query

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.

Language

Lookahead Iterator

Global Configuration