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
Tabs are counted as single characters by our lexer. This works fine for everything except printing out the indication of where in the line an error occurred. This will go wrong as the source will be printed with tabs in it, which will be expanded to multiple spaces by printf, but the location indication will be printed with space per source character, including one space per tab.
We could simply replace tabs with single spaces when printing out the source for errors.
Alternatively we could replace all tabs with spaces during lexing.
The text was updated successfully, but these errors were encountered:
Tabs are counted as single characters by our lexer. This works fine for everything except printing out the indication of where in the line an error occurred. This will go wrong as the source will be printed with tabs in it, which will be expanded to multiple spaces by printf, but the location indication will be printed with space per source character, including one space per tab.
We could simply replace tabs with single spaces when printing out the source for errors.
Alternatively we could replace all tabs with spaces during lexing.
The text was updated successfully, but these errors were encountered: