Skip to content

Commit

Permalink
add possibility to have _ as identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-develop committed Apr 9, 2022
1 parent 7cf6777 commit 11d61a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def make_tokens(self):
tokens.append(number)
else:
return [], error
elif self.current_char in LETTERS:
elif self.current_char in LETTERS + '_':
tokens.append(self.make_identifier())
elif self.current_char == '"' or self.current_char == "'":
string_, error = self.make_string(self.current_char)
Expand Down

0 comments on commit 11d61a2

Please sign in to comment.