LSL-PyOptimizer/lslopt
Sei Lisa c544b51e37 Rewrite ReportError() and change EParse to report columns in chars.
ReportError() needed to account for terminal encodings that don't support the characters being printed. It was also reporting an inaccurate column number and its corresponding marker position, because the count was in bytes, not in characters, so that has been fixed.

Now EParse.__init__() calls a new function GetErrLineCol() that calculates the line and column corresponding to an error position.

The algorithm for finding the start of the line has also been changed in both ReportError() and EParse.__init__(); as a result, function fieldpos() has been removed.

The exception's lno and cno fields have been changed to be 1-based, rather than 0-based.

Thanks to @Jomik for the report. Fixes #5.
2017-10-05 18:50:45 +02:00
..
__init__.py Initial commit. Status so far: 2014-07-26 02:43:44 +02:00
lslbasefuncs.py Fix return value for some detection functions. 2017-08-30 19:23:38 +02:00
lslcommon.py Separate library function optimization into a different file. 2017-08-25 20:35:24 +02:00
lsldeadcode.py Bump copyright year. 2017-08-09 19:45:46 +02:00
lslextrafuncs.py Minor cleanups; no functional changes. 2017-09-22 15:42:42 +02:00
lslfoldconst.py Simplify a = a = b -> a = b 2017-09-22 16:14:50 +02:00
lslfuncopt.py Minor cleanups; no functional changes. 2017-09-22 15:42:42 +02:00
lslfuncs.py Bump copyright year. 2017-08-09 19:45:46 +02:00
lsljson.py Bump copyright year. 2017-08-09 19:45:46 +02:00
lsllastpass.py Minor cleanups; no functional changes. 2017-09-22 15:42:42 +02:00
lsloptimizer.py Implement transformation of lists into additions. 2017-09-15 22:30:22 +02:00
lsloutput.py Format LIST nodes; don't add indent to CONST list in calc mode 2017-08-25 20:35:24 +02:00
lslparse.py Rewrite ReportError() and change EParse to report columns in chars. 2017-10-05 18:50:45 +02:00
lslrenamer.py Add TODO item to lslrenamer. 2017-08-16 22:00:16 +02:00