Rizin
unix-like reverse engineering framework and cli tools
highlight.h File Reference
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct TSHighlighter TSHighlighter
 
typedef struct TSHighlightBuffer TSHighlightBuffer
 

Enumerations

enum  TSHighlightError {
  TSHighlightOk , TSHighlightUnknownScope , TSHighlightTimeout , TSHighlightInvalidLanguage ,
  TSHighlightInvalidUtf8 , TSHighlightInvalidRegex , TSHighlightInvalidQuery
}
 

Functions

TSHighlighterts_highlighter_new (const char **highlight_names, const char **attribute_strings, uint32_t highlight_count)
 
void ts_highlighter_delete (TSHighlighter *)
 
TSHighlightError ts_highlighter_add_language (TSHighlighter *self, const char *scope_name, const char *injection_regex, const TSLanguage *language, const char *highlight_query, const char *injection_query, const char *locals_query, uint32_t highlight_query_len, uint32_t injection_query_len, uint32_t locals_query_len)
 
TSHighlightError ts_highlighter_highlight (const TSHighlighter *self, const char *scope_name, const char *source_code, uint32_t source_code_len, TSHighlightBuffer *output, const size_t *cancellation_flag)
 
TSHighlightBufferts_highlight_buffer_new ()
 
void ts_highlight_buffer_delete (TSHighlightBuffer *)
 
const uint8_tts_highlight_buffer_content (const TSHighlightBuffer *)
 
const uint32_tts_highlight_buffer_line_offsets (const TSHighlightBuffer *)
 
uint32_t ts_highlight_buffer_len (const TSHighlightBuffer *)
 
uint32_t ts_highlight_buffer_line_count (const TSHighlightBuffer *)
 

Typedef Documentation

◆ TSHighlightBuffer

Definition at line 1 of file highlight.h.

◆ TSHighlighter

typedef struct TSHighlighter TSHighlighter

Definition at line 1 of file highlight.h.

Enumeration Type Documentation

◆ TSHighlightError

Enumerator
TSHighlightOk 
TSHighlightUnknownScope 
TSHighlightTimeout 
TSHighlightInvalidLanguage 
TSHighlightInvalidUtf8 
TSHighlightInvalidRegex 
TSHighlightInvalidQuery 

Definition at line 10 of file highlight.h.

10  {
TSHighlightError
Definition: highlight.h:10
@ TSHighlightTimeout
Definition: highlight.h:13
@ TSHighlightInvalidLanguage
Definition: highlight.h:14
@ TSHighlightOk
Definition: highlight.h:11
@ TSHighlightUnknownScope
Definition: highlight.h:12
@ TSHighlightInvalidRegex
Definition: highlight.h:16
@ TSHighlightInvalidQuery
Definition: highlight.h:17
@ TSHighlightInvalidUtf8
Definition: highlight.h:15

Function Documentation

◆ ts_highlight_buffer_content()

const uint8_t* ts_highlight_buffer_content ( const TSHighlightBuffer )

◆ ts_highlight_buffer_delete()

void ts_highlight_buffer_delete ( TSHighlightBuffer )

◆ ts_highlight_buffer_len()

uint32_t ts_highlight_buffer_len ( const TSHighlightBuffer )

◆ ts_highlight_buffer_line_count()

uint32_t ts_highlight_buffer_line_count ( const TSHighlightBuffer )

◆ ts_highlight_buffer_line_offsets()

const uint32_t* ts_highlight_buffer_line_offsets ( const TSHighlightBuffer )

◆ ts_highlight_buffer_new()

TSHighlightBuffer* ts_highlight_buffer_new ( )

◆ ts_highlighter_add_language()

TSHighlightError ts_highlighter_add_language ( TSHighlighter self,
const char *  scope_name,
const char *  injection_regex,
const TSLanguage language,
const char *  highlight_query,
const char *  injection_query,
const char *  locals_query,
uint32_t  highlight_query_len,
uint32_t  injection_query_len,
uint32_t  locals_query_len 
)

◆ ts_highlighter_delete()

void ts_highlighter_delete ( TSHighlighter )

◆ ts_highlighter_highlight()

TSHighlightError ts_highlighter_highlight ( const TSHighlighter self,
const char *  scope_name,
const char *  source_code,
uint32_t  source_code_len,
TSHighlightBuffer output,
const size_t cancellation_flag 
)

◆ ts_highlighter_new()

TSHighlighter* ts_highlighter_new ( const char **  highlight_names,
const char **  attribute_strings,
uint32_t  highlight_count 
)