Skip to content

Commit

Permalink
feat(identifier): Allowed _ in identifiers for better code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasBoda committed Jan 6, 2024
1 parent fcba635 commit 97c0db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lexer/lexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class Lexer {
if (this.isAlpha()) {
let identifier = "";

while (this.hasNext() && this.isAlpha()) {
while (this.hasNext() && (this.isAlpha() || this.getNext().value === "_")) {
identifier += this.next().value;
}

Expand Down

0 comments on commit 97c0db8

Please sign in to comment.