1
0
Fork 0

Adding upstream version 26.8.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-04 07:54:33 +01:00
parent 4b797b16f0
commit 4c394df415
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
61 changed files with 43883 additions and 41898 deletions

2
sqlglotrs/Cargo.lock generated
View file

@ -503,7 +503,7 @@ dependencies = [
[[package]]
name = "sqlglotrs"
version = "0.3.14"
version = "0.4.0"
dependencies = [
"criterion",
"pyo3",

View file

@ -1,6 +1,6 @@
[package]
name = "sqlglotrs"
version = "0.3.14"
version = "0.4.0"
edition = "2021"
license = "MIT"

View file

@ -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)
}
}