Herb C Reference
Loading...
Searching...
No Matches
herb.h
Go to the documentation of this file.
1#ifndef HERB_H
2#define HERB_H
3
4#include "ast_node.h"
5#include "extract.h"
6#include "macros.h"
7#include "parser.h"
8#include "util/hb_arena.h"
9#include "util/hb_array.h"
10#include "util/hb_buffer.h"
11
12#include <stdint.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18typedef struct {
19 hb_array_T* tokens;
20 hb_arena_T* arena;
22
23HERB_EXPORTED_FUNCTION void herb_lex_to_buffer(const char* source, hb_buffer_T* output);
24
25HERB_EXPORTED_FUNCTION herb_lex_result_T* herb_lex(const char* source, hb_arena_T* arena);
26HERB_EXPORTED_FUNCTION herb_lex_result_T* herb_lex_file(const char* path, hb_arena_T* arena);
27
29 const char* source,
30 const parser_options_T* options,
31 hb_arena_T* arena
32);
33
34HERB_EXPORTED_FUNCTION const char* herb_version(void);
36
38HERB_EXPORTED_FUNCTION void herb_free_tokens(hb_array_T** tokens);
39
40#ifdef __cplusplus
41}
42#endif
43
44#endif
HERB_EXPORTED_FUNCTION const char * herb_prism_version(void)
Definition herb.c:140
HERB_EXPORTED_FUNCTION AST_DOCUMENT_NODE_T * herb_parse(const char *source, const parser_options_T *options, hb_arena_T *arena)
Definition herb.c:43
void herb_free_lex_result(herb_lex_result_T **result)
Definition herb.c:109
HERB_EXPORTED_FUNCTION void herb_lex_to_buffer(const char *source, hb_buffer_T *output)
Definition herb.c:79
HERB_EXPORTED_FUNCTION const char * herb_version(void)
Definition herb.c:136
HERB_EXPORTED_FUNCTION herb_lex_result_T * herb_lex(const char *source, hb_arena_T *arena)
Definition herb.c:16
HERB_EXPORTED_FUNCTION herb_lex_result_T * herb_lex_file(const char *path, hb_arena_T *arena)
Definition herb.c:70
HERB_EXPORTED_FUNCTION void herb_free_tokens(hb_array_T **tokens)
Definition herb.c:125
#define HERB_EXPORTED_FUNCTION
Definition macros.h:8
Definition ast_nodes.h:65
Definition parser.h:19
Definition herb.h:18
hb_arena_T * arena
Definition herb.h:20
hb_array_T * tokens
Definition herb.h:19