Closed rturrado closed 3 months ago
I've seen today that:
1) EOF tokens contain an <EOF>
text, i.e., a string of size 5.
2) We use the size of the token text for calculating the size of the token.
I've been valuing different options as possible fixes for the issue:
CustomErrorListener
and, for that case, report a size of 0. The start and end column indexes would point right after the last character of the file. I have to check with the Frontend people if this is OK with them.
Let's say we have a program such as:
Where, after the token
4
, we just find EOF.At the moment, libqasm is reporting the following error:
Error at input.cq:5:9..14: missing ']' at '<EOF>'
.The starting column points to the position just after
4
(remember columns start at 1).