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

[NFC] Update row/col to pos_t #34

Merged
merged 2 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int Lexer::getNextChar() {

Result<Token> Lexer::Lex() {
int ch = getNextChar();
uint32_t row = row_, col = col_;
pos_t row = row_, col = col_;

// skip the whitespace
while (isspace(ch)) {
Expand Down
2 changes: 1 addition & 1 deletion xos.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Lexer {
int getNextChar();

std::istream &input_;
uint32_t row_ = 1, col_ = 0;
pos_t row_ = 1, col_ = 0;

bool has_lookahead_ = false;
int lookahead_;
Expand Down