Closed andreasabel closed 1 year ago
Fix #180: example tiger.x: correct position of lexed string literal.
Previously, we would get e.g.
Lexeme class=STRING "Hello, world!" posn=1:19 string="\""
where the position points at the closing double quotes which are also errorneously returned as lexed input.
Now, we produce
Lexeme class=STRING "Hello, world!" posn=1:5
with the correct starting position yet no information about the lexed input (Nothing).
Nothing
To produce the lexed input, one needs more information in the lexer state. Not worth fixing, I deem, this is good enough as is as an example for Alex.
Fix #180: example tiger.x: correct position of lexed string literal.
Previously, we would get e.g.
where the position points at the closing double quotes which are also errorneously returned as lexed input.
Now, we produce
with the correct starting position yet no information about the lexed input (
Nothing
).To produce the lexed input, one needs more information in the lexer state.
Not worth fixing, I deem, this is good enough as is as an example for Alex.