Commit 215f8fdd authored by take_cheeze's avatar take_cheeze

Fix lineno overwrite in parser_init_cxt.

By reordering parsing string with mrb_parser_parse won't always start with line 1.
parent 49abcd4c
......@@ -5263,8 +5263,8 @@ static void
parser_init_cxt(parser_state *p, mrbc_context *cxt)
{
if (!cxt) return;
if (cxt->lineno) p->lineno = cxt->lineno;
if (cxt->filename) mrb_parser_set_filename(p, cxt->filename);
if (cxt->lineno) p->lineno = cxt->lineno;
if (cxt->syms) {
int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment