mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler: make mrb_ast_node an opaque struct in compile.h
Move the definition of struct mrb_ast_node to a private header to hide implementation details from the public API. Co-authored-by: Gemini <gemini@google.com>
This commit is contained in:
@@ -53,10 +53,7 @@ MRB_API void mrb_ccontext_cleanup_local_variables(mrb_ccontext *c);
|
||||
#define mrbc_cleanup_local_variables mrb_ccontext_cleanup_local_variables
|
||||
|
||||
/* AST node structure */
|
||||
typedef struct mrb_ast_node {
|
||||
struct mrb_ast_node *car, *cdr;
|
||||
uint16_t lineno, filename_index;
|
||||
} mrb_ast_node;
|
||||
typedef struct mrb_ast_node mrb_ast_node;
|
||||
|
||||
/* lexer states */
|
||||
enum mrb_lex_state_enum {
|
||||
|
||||
@@ -139,4 +139,10 @@ struct mrb_parser_heredoc_info {
|
||||
mrb_ast_node *doc;
|
||||
};
|
||||
|
||||
/* AST node structure */
|
||||
struct mrb_ast_node {
|
||||
struct mrb_ast_node *car, *cdr;
|
||||
uint16_t lineno, filename_index;
|
||||
};
|
||||
|
||||
#endif /* MRUBY_COMPILER_NODE_H */
|
||||
|
||||
Reference in New Issue
Block a user