Skip to content

Conversation

@NoahGJAC
Copy link

@NoahGJAC NoahGJAC commented Jul 5, 2024

Just caught up to the latest video in the series and saw @orosmatthew wanted to but didn't implement columns. This series has been great in teaching me C++ and learn more about how compilers work.

Simple solution to add a column count to error messages that works pretty well for it's simplicity.

Changes:

  • Parser.hpp
    • Update to display column count in error_expected() and the binding.
  • Tokenization.hpp
    • Add a column_count int that is incremented on each consume and is reset to 1 on new lines.
    • Update all token.push_backs() to include column_count

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

Successfully merging this pull request may close these issues.

1 participant