summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mruby/compile.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/mruby/compile.h b/include/mruby/compile.h
index 0f7cffd08..ed4e9612c 100644
--- a/include/mruby/compile.h
+++ b/include/mruby/compile.h
@@ -37,8 +37,7 @@ void mrbc_partial_hook(mrb_state *mrb, mrbc_context *c, int (*partial_hook)(stru
/* AST node structure */
typedef struct mrb_ast_node {
struct mrb_ast_node *car, *cdr;
- uint16_t lineno;
- char const* filename;
+ uint16_t lineno, filename;
} mrb_ast_node;
/* lexer states */
@@ -144,6 +143,10 @@ struct mrb_parser_state {
struct mrb_parser_message error_buffer[10];
struct mrb_parser_message warn_buffer[10];
+ mrb_sym* filename_table;
+ size_t filename_table_length;
+ int current_filename_index;
+
jmp_buf jmp;
};
@@ -152,6 +155,7 @@ void mrb_parser_free(struct mrb_parser_state*);
void mrb_parser_parse(struct mrb_parser_state*,mrbc_context*);
void mrb_parser_set_filename(struct mrb_parser_state*, char const*);
+char const* mrb_parser_get_filename(struct mrb_parser_state*, uint16_t idx);
/* utility functions */
#ifdef ENABLE_STDIO