Scanner - Allow identifiers with a leading '_'
This commit is contained in:
parent
4bce85e14b
commit
670b50e8cd
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ impl Scanner {
|
|||
// Numbers
|
||||
ch if ch.is_ascii_digit() => self.number(),
|
||||
// Identifiers
|
||||
ch if ch.is_ascii_alphabetic() => self.identifier(),
|
||||
ch if ch.is_ascii_alphabetic() || ch == '_' => self.identifier(),
|
||||
// Anything else is an error
|
||||
_ => self.error("unexpected character".to_owned()),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue