summaryrefslogtreecommitdiffhomepage
path: root/src/compile.h
diff options
context:
space:
mode:
authormimaki <[email protected]>2012-04-23 11:51:47 +0900
committermimaki <[email protected]>2012-04-23 11:51:47 +0900
commitc80487561f291e8239541687341b4d64a840c108 (patch)
treed4f7777cc91597cf880bed364df26066b9aaee8f /src/compile.h
parent835443614d21b13b27af3674d7f8cb9bf49c298b (diff)
parent3f0b98762d4a49beb7cc3f9cc8a8dfcee4aa5f6f (diff)
downloadmruby-c80487561f291e8239541687341b4d64a840c108.tar.gz
mruby-c80487561f291e8239541687341b4d64a840c108.zip
Merge branch 'master' of github.com:mruby/mruby
Conflicts: src/variable.c
Diffstat (limited to 'src/compile.h')
-rw-r--r--src/compile.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compile.h b/src/compile.h
index 49c8e9cf8..6e6975cbf 100644
--- a/src/compile.h
+++ b/src/compile.h
@@ -31,6 +31,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;
@@ -61,14 +67,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*);