diff options
Diffstat (limited to 'src/compile.h')
| -rw-r--r-- | src/compile.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compile.h b/src/compile.h index f0e6b1874..212628deb 100644 --- a/src/compile.h +++ b/src/compile.h @@ -25,6 +25,12 @@ enum mrb_lex_state_enum { EXPR_MAX_STATE }; +struct mrb_parser_message { + int lineno; + int column; + char* message; +}; + struct mrb_parser_state { mrb_state *mrb; struct mrb_pool *pool; @@ -55,14 +61,20 @@ struct mrb_parser_state { void *ylval; int nerr; + int nwarn; mrb_ast_node *tree, *begin_tree; + int capture_errors; + struct mrb_parser_message error_buffer[10]; + struct mrb_parser_message warn_buffer[10]; + jmp_buf jmp; }; struct mrb_parser_state* mrb_parse_file(mrb_state*,FILE*); struct mrb_parser_state* mrb_parse_string(mrb_state*,char*); struct mrb_parser_state* mrb_parse_nstring(mrb_state*,char*,size_t); +struct mrb_parser_state* mrb_parse_nstring_ext(mrb_state*,char*,size_t); int mrb_generate_code(mrb_state*, mrb_ast_node*); int mrb_compile_file(mrb_state*,FILE*); |
