diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 12:32:34 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 12:32:34 +0900 |
| commit | a751f7f196e35cf85ac6f5c0d855edeb68b2bf53 (patch) | |
| tree | c025d53534298097aadc3d7699de964bd8a7225f /mrbgems/mruby-bin-mirb | |
| parent | fef4b394a7f7f5aa11b85316c504772512220954 (diff) | |
| download | mruby-a751f7f196e35cf85ac6f5c0d855edeb68b2bf53.tar.gz mruby-a751f7f196e35cf85ac6f5c0d855edeb68b2bf53.zip | |
Make `mirb` to print warnings; ref #3827
Diffstat (limited to 'mrbgems/mruby-bin-mirb')
| -rw-r--r-- | mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index 7e5fd392f..8084e8af3 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c @@ -528,6 +528,10 @@ done: /* no evaluation of code */ } else { + if (0 < parser->nwarn) { + /* warning */ + printf("line %d: %s\n", parser->warn_buffer[0].lineno, parser->warn_buffer[0].message); + } if (0 < parser->nerr) { /* syntax error */ printf("line %d: %s\n", parser->error_buffer[0].lineno, parser->error_buffer[0].message); |
