From adadbf579278108180c299df54793dc364e5b850 Mon Sep 17 00:00:00 2001 From: Kazuho Oku Date: Mon, 21 Dec 2015 14:58:43 +0900 Subject: in `peekc_n`, adjust column number after calling `nextc` --- mrbgems/mruby-compiler/core/parse.y | 1 + 1 file changed, 1 insertion(+) diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 356cb5aa7..b08775cc7 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -3473,6 +3473,7 @@ peekc_n(parser_state *p, int n) do { c0 = nextc(p); if (c0 == -1) return c0; /* do not skip partial EOF */ + if (c0 >= 0) --p->column; list = push(list, (node*)(intptr_t)c0); } while(n--); if (p->pb) { -- cgit v1.2.3