You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the loc pragma allows to set the filename, line_number and column_number of the next token to be read by the lexer.
Its format is: #<loc:some_filename,line_number,column_number>some_token surrounded by #<loc:push> and #<loc:pop>.
So for example: #<loc:push>#<loc:"/tmp/loc.cr",22,7>SomeConst#<loc:pop>.
The lack of end numbers makes error reporting only show a ^ under the token, instead of a nice ^~~~~~~~ for the whole token.
My suggestion is to add 2 (optional?) numbers to the loc pragma to also have end_line_number and end_column_number.
Currently the loc pragma allows to set the
filename
,line_number
andcolumn_number
of the next token to be read by the lexer.Its format is:
#<loc:some_filename,line_number,column_number>some_token
surrounded by#<loc:push>
and#<loc:pop>
.So for example:
#<loc:push>#<loc:"/tmp/loc.cr",22,7>SomeConst#<loc:pop>
.The lack of end numbers makes error reporting only show a
^
under the token, instead of a nice^~~~~~~~
for the whole token.My suggestion is to add 2 (optional?) numbers to the loc pragma to also have
end_line_number
andend_column_number
.I think this would be useful for #6125.
The text was updated successfully, but these errors were encountered: