Fix #3741, simplifying things in the process
authorSimon Marlow <marlowsd@gmail.com>
Thu, 10 Dec 2009 16:09:09 +0000 (16:09 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 10 Dec 2009 16:09:09 +0000 (16:09 +0000)
commitf4b727487a65e6b611bbaafbd2207bd63a8df706
treec0b78c8983d7fc0e434403bd90f96c9fc8a81b58
parent3e17c05b0550e8cbf47a4e9659e40826e364eb81
Fix #3741, simplifying things in the process
The problem in #3741 was that we had confused column numbers with byte
offsets, which fails in the case of UTF-8 (amongst other things).
Fortunately we're tracking correct column offsets now, so we didn't
have to make a calculation based on a byte offset.  I got rid of two
fields from the PState (last_line_len and last_offs).and one field
from the AI (alex input) constructor.
compiler/cmm/CmmLex.x
compiler/parser/Lexer.x