Jack compiler now supports underscores in identifier
This commit is contained in:
@@ -359,7 +359,7 @@ fn parse_keyword_or_identifier(chars: &Vec<char>, tokens: &mut Vec<Token>, index
|
||||
token_string.push(chars[index]);
|
||||
index += 1;
|
||||
|
||||
while chars[index].is_alphanumeric() {
|
||||
while chars[index].is_alphanumeric() || chars[index] == '_' {
|
||||
token_string.push(chars[index]);
|
||||
index += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user