diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-04 09:49:16 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-04 09:49:16 +0900 |
| commit | 02dba483675842b318deb1d042d9069ae9fcdb58 (patch) | |
| tree | 6788bdc018791190abcaf20d6d540974ba2fd042 /tools | |
| parent | e13248bedf7f5d4ec9dded0320eb43e258c6e726 (diff) | |
| parent | 73309aefa5a049a8201a3f2c6ef7ae4cd08af9dd (diff) | |
| download | mruby-02dba483675842b318deb1d042d9069ae9fcdb58.tar.gz mruby-02dba483675842b318deb1d042d9069ae9fcdb58.zip | |
Merge branch 'heredoc' of https://github.com/FUKUZAWA-Tadashi/mruby into FUKUZAWA-Tadashi-heredoc
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mirb/mirb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/mirb/mirb.c b/tools/mirb/mirb.c index 29685cf28..e20de629d 100644 --- a/tools/mirb/mirb.c +++ b/tools/mirb/mirb.c @@ -40,6 +40,13 @@ is_code_block_open(struct mrb_parser_state *parser) /* check for unterminated string */ if (parser->sterm) return TRUE; + /* check for heredoc */ + if (parser->heredoc_starts_nextline) return TRUE; + if (parser->heredoc_end_now) { + parser->heredoc_end_now = FALSE; + return FALSE; + } + /* check if parser error are available */ if (0 < parser->nerr) { const char *unexpected_end = "syntax error, unexpected $end"; |
