Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs mess up error reporting #22

Closed
andymcn opened this issue Sep 2, 2014 · 1 comment
Closed

Tabs mess up error reporting #22

andymcn opened this issue Sep 2, 2014 · 1 comment

Comments

@andymcn
Copy link
Contributor

andymcn commented Sep 2, 2014

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.

@andymcn andymcn added the bug label Sep 2, 2014
@andymcn
Copy link
Contributor Author

andymcn commented Sep 18, 2014

Each tab in the source is now replaced by a single space by the lexer

@andymcn andymcn closed this as completed Sep 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant