diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-13 15:00:45 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-13 15:00:45 +0900 |
| commit | 737eaea038af56794b8fdb5a66bb4138dbd446f6 (patch) | |
| tree | 00cd7c3d021325fd0adad67a32aee0aac2fb5461 /src/parse.y | |
| parent | bbec03bb7af3fb0277a267e4ec5d38b58aa5cb46 (diff) | |
| download | mruby-737eaea038af56794b8fdb5a66bb4138dbd446f6.tar.gz mruby-737eaea038af56794b8fdb5a66bb4138dbd446f6.zip | |
allow DISABLE/ENABLE_SATDIO
Diffstat (limited to 'src/parse.y')
| -rw-r--r-- | src/parse.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y index 13643f68e..8d626b5d8 100644 --- a/src/parse.y +++ b/src/parse.y @@ -2964,12 +2964,14 @@ yyerror(parser_state *p, const char *s) int n; if (! p->capture_errors) { +#ifdef ENABLE_STDIO if (p->filename) { fprintf(stderr, "%s:%d:%d: %s\n", p->filename, p->lineno, p->column, s); } else { fprintf(stderr, "line %d:%d: %s\n", p->lineno, p->column, s); } +#endif } else if (p->nerr < sizeof(p->error_buffer) / sizeof(p->error_buffer[0])) { n = strlen(s); @@ -2998,12 +3000,14 @@ yywarn(parser_state *p, const char *s) int n; if (! p->capture_errors) { +#ifdef ENABLE_STDIO if (p->filename) { fprintf(stderr, "%s:%d:%d: %s\n", p->filename, p->lineno, p->column, s); } else { fprintf(stderr, "line %d:%d: %s\n", p->lineno, p->column, s); } +#endif } else if (p->nerr < sizeof(p->warn_buffer) / sizeof(p->warn_buffer[0])) { n = strlen(s); @@ -4943,6 +4947,7 @@ dump_recur(mrb_state *mrb, node *tree, int offset) void parser_dump(mrb_state *mrb, node *tree, int offset) { +#ifdef ENABLE_STDIO int n; if (!tree) return; @@ -5631,7 +5636,7 @@ parser_dump(mrb_state *mrb, node *tree, int offset) printf("node type: %d (0x%x)\n", (int)n, (int)n); break; } - return; +#endif } #ifdef PARSER_TEST |
