Adding upstream version 26.8.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4b797b16f0
commit
4c394df415
61 changed files with 43883 additions and 41898 deletions
2
sqlglotrs/Cargo.lock
generated
2
sqlglotrs/Cargo.lock
generated
|
@ -503,7 +503,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sqlglotrs"
|
||||
version = "0.3.14"
|
||||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"criterion",
|
||||
"pyo3",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "sqlglotrs"
|
||||
version = "0.3.14"
|
||||
version = "0.4.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ impl<'a> TokenizerState<'a> {
|
|||
break;
|
||||
}
|
||||
|
||||
if !self.settings.white_space.contains_key(&self.current_char) {
|
||||
if !self.current_char.is_whitespace() {
|
||||
if self.current_char.is_ascii_digit() {
|
||||
self.scan_number()?;
|
||||
} else if let Some(identifier_end) =
|
||||
|
@ -575,9 +575,12 @@ impl<'a> TokenizerState<'a> {
|
|||
) -> Result<(), TokenizerError> {
|
||||
self.advance(1)?;
|
||||
let value = self.extract_value()?[2..].to_string();
|
||||
match u64::from_str_radix(&value, radix) {
|
||||
Ok(_) => self.add(radix_token_type, Some(value)),
|
||||
Err(_) => self.add(self.token_types.identifier, None),
|
||||
|
||||
// Validate if the string consists only of valid hex digits
|
||||
if value.chars().all(|c| c.is_digit(radix)) {
|
||||
self.add(radix_token_type, Some(value))
|
||||
} else {
|
||||
self.add(self.token_types.identifier, None)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue