Skip to content

Commit

Permalink
fix: don't skip first character on peek
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed Dec 11, 2023
1 parent 1f771e9 commit 3f4964c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lexer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class Lexer {
}

public peekAfterWhiteSpaces(): string | null {
let peek_pos = this.pos + 1;
let peek_pos = this.pos;

while (is_space(this.text[peek_pos])) {
if (peek_pos > this.text.length - 1) {
Expand Down

0 comments on commit 3f4964c

Please sign in to comment.