Merging upstream version 22.2.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b13ba670fd
commit
2c28c49d7e
148 changed files with 68457 additions and 63176 deletions
2
sqlglotrs/Cargo.lock
generated
2
sqlglotrs/Cargo.lock
generated
|
@ -188,7 +188,7 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
|
|||
|
||||
[[package]]
|
||||
name = "sqlglotrs"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
dependencies = [
|
||||
"pyo3",
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "sqlglotrs"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -178,15 +178,6 @@ impl<'a> TokenizerState<'a> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn peek(&self, i: usize) -> Result<char, TokenizerError> {
|
||||
let index = self.current + i;
|
||||
if index < self.size {
|
||||
self.char_at(index)
|
||||
} else {
|
||||
Ok('\0')
|
||||
}
|
||||
}
|
||||
|
||||
fn chars(&self, size: usize) -> String {
|
||||
let start = self.current - 1;
|
||||
let end = start + size;
|
||||
|
@ -469,13 +460,8 @@ impl<'a> TokenizerState<'a> {
|
|||
if self.peek_char.is_digit(10) {
|
||||
self.advance(1)?;
|
||||
} else if self.peek_char == '.' && !decimal {
|
||||
let after = self.peek(1)?;
|
||||
if after.is_digit(10) || !after.is_alphabetic() {
|
||||
decimal = true;
|
||||
self.advance(1)?;
|
||||
} else {
|
||||
return self.add(self.token_types.var, None);
|
||||
}
|
||||
decimal = true;
|
||||
self.advance(1)?;
|
||||
} else if (self.peek_char == '-' || self.peek_char == '+') && scientific == 1 {
|
||||
scientific += 1;
|
||||
self.advance(1)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue