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:
Yukihiro "Matz" Matsumoto
2025-08-20 10:31:24 +09:00
parent ae7e125388
commit 2cbb99c16d
2 changed files with 7 additions and 4 deletions
+1 -4
View File
@@ -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 {
+6
View File
@@ -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 */