summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-05-14 23:39:56 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-05-14 23:39:56 +0900
commit95fb1fd809780e71848c339f8e3e035d1ae015d6 (patch)
tree48d1f572b8c1cb25472bdb8c6b1a0c1d4ecc835f /include
parent7cc66cf819beb5398d6fd40711373f9cfe79b77a (diff)
downloadmruby-95fb1fd809780e71848c339f8e3e035d1ae015d6.tar.gz
mruby-95fb1fd809780e71848c339f8e3e035d1ae015d6.zip
mrbc to take multiple files, preserving debug information if -g given; close #1243
Diffstat (limited to 'include')
-rw-r--r--include/mruby/compile.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mruby/compile.h b/include/mruby/compile.h
index 51615fe9f..c1c646508 100644
--- a/include/mruby/compile.h
+++ b/include/mruby/compile.h
@@ -14,12 +14,15 @@ extern "C" {
#include "mruby.h"
#include <setjmp.h>
+struct mrb_parser_state;
/* load context */
typedef struct mrbc_context {
mrb_sym *syms;
int slen;
char *filename;
short lineno;
+ int (*partial_hook)(struct mrb_parser_state*);
+ void *partial_data;
mrb_bool capture_errors:1;
mrb_bool dump_result:1;
mrb_bool no_exec:1;
@@ -28,6 +31,7 @@ typedef struct mrbc_context {
mrbc_context* mrbc_context_new(mrb_state *mrb);
void mrbc_context_free(mrb_state *mrb, mrbc_context *cxt);
const char *mrbc_filename(mrb_state *mrb, mrbc_context *c, const char *s);
+void mrbc_partial_hook(mrb_state *mrb, mrbc_context *c, int (*partial_hook)(struct mrb_parser_state*), void*data);
/* AST node structure */
typedef struct mrb_ast_node {
@@ -104,6 +108,7 @@ struct mrb_parser_state {
#ifdef ENABLE_STDIO
FILE *f;
#endif
+ mrbc_context *cxt;
char *filename;
int lineno;
int column;