From 68bd7edaf2a3d5a8c962bb2f7288ab46c470040f Mon Sep 17 00:00:00 2001 From: fabien Date: Wed, 10 Sep 2008 20:19:39 +0200 Subject: [PATCH] fixed error position reporting in mlc.mlua --- src/compiler/mlc.mlua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/mlc.mlua b/src/compiler/mlc.mlua index b114ad1..05a23f7 100644 --- a/src/compiler/mlc.mlua +++ b/src/compiler/mlc.mlua @@ -102,9 +102,9 @@ function mlc.convert (x, src_fmt, dst_fmt, name) if not status and x then -- x = error msg; get rid of ??? x = x:strmatch "[^:]+:[0-9]+: (.*)" or x - local lxline = lx:lineinfo().first[1] or "?" - error(string.format("Parsing error in %s line %s, char %s: \n%s", - name or "?", lxline, lx.i, x)) + local li = lx:lineinfo() + error(string.format("Parsing error in %s line %s, column %i, char %s: \n%s", + name or "", li[1], li[2], li[3], x)) return nil end -- 2.44.0