diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-03-01 00:05:54 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-03-01 00:05:54 +0900 |
| commit | cd0ac59dd36fc515e3667ab462fe8c4424b5928a (patch) | |
| tree | cb8aaa1d18aab06adebcc31a199334f73ec65bc2 | |
| parent | 1a1f834adeb243c5938604eb826c65d1f0efede0 (diff) | |
| download | mruby-cd0ac59dd36fc515e3667ab462fe8c4424b5928a.tar.gz mruby-cd0ac59dd36fc515e3667ab462fe8c4424b5928a.zip | |
Newlines in strings should be counted; fix #3477
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 1203393bf..6548eb18c 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -4069,6 +4069,10 @@ parse_string(parser_state *p) return tSTRING_MID; } } + if (c == '\n') { + p->lineno++; + p->column = 0; + } tokadd(p, c); } |
