13#ifndef __PROTOBUF_LANG_TREE_H__
14#define __PROTOBUF_LANG_TREE_H__
25#define PBL_DEFAULT_PACKAGE_NAME ""
27typedef void(*pbl_report_error_cb_t)(
const char *msg_format, ...);
48 pbl_report_error_cb_t error_cb;
50 GHashTable* proto_files;
51 GQueue* proto_files_to_be_parsed;
59 const char* package_name;
60 int package_name_lineno;
66 pbl_node_type_t nodetype;
71 GHashTable* children_by_name;
89 GHashTable* fields_by_number;
107 bool has_default_value;
108 char* orig_default_value;
109 int string_or_bytes_default_value_length;
127 GHashTable* values_by_number;
147 GSList* lex_string_tokens;
148 GSList* lex_struct_tokens;
161 parser_state->lex_string_tokens = g_slist_prepend(parser_state->lex_string_tokens, dupstr);
170 parser_state->lex_struct_tokens = g_slist_prepend(parser_state->lex_struct_tokens, newtoken);
176pbl_printf(
const char* fmt, ...)
225pbl_message_descriptor_pool_FindMessageTypeByName(
const pbl_descriptor_pool_t* pool,
const char* name);
277pbl_field_descriptor_TypeName(
int field_type);
382pbl_set_node_name(
pbl_node_t* node,
int lineno,
const char* newname);
385static inline const char*
409pbl_create_field_node(
pbl_file_descriptor_t* file,
int lineno,
const char* label,
const char* type_name,
const char* name,
int number,
pbl_node_t* options);
417pbl_create_method_node(
pbl_file_descriptor_t* file,
int lineno,
const char* name,
const char* in_msg_type,
bool in_is_stream,
const char* out_msg_type,
bool out_is_stream);
425pbl_free_node(
void *anode);
void pbl_reinit_descriptor_pool(pbl_descriptor_pool_t **ppool, const char **directories, pbl_report_error_cb_t error_cb)
Definition protobuf_lang_tree.c:107
Definition protobuf_lang_tree.h:144
Definition protobuf_lang_tree.h:138
Definition protobuf_lang_tree.h:46
Definition protobuf_lang_tree.h:124
Definition protobuf_lang_tree.h:93
Definition protobuf_lang_tree.h:99
Definition protobuf_lang_tree.h:56
Definition protobuf_lang_tree.h:86
Definition protobuf_lang_tree.h:77
Definition protobuf_lang_tree.h:65
Definition protobuf_lang_tree.h:132