diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-03 14:11:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-03 14:11:03 +0000 |
commit | 5d0ea770947ae1da51537ff75b14b48218d729aa (patch) | |
tree | 86e66fc69feeae4c4b23749e7779f6731791edcc /sqlglotrs | |
parent | Adding upstream version 21.1.2. (diff) | |
download | sqlglot-5d0ea770947ae1da51537ff75b14b48218d729aa.tar.xz sqlglot-5d0ea770947ae1da51537ff75b14b48218d729aa.zip |
Adding upstream version 22.2.0.upstream/22.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglotrs')
-rw-r--r-- | sqlglotrs/Cargo.lock | 2 | ||||
-rw-r--r-- | sqlglotrs/Cargo.toml | 2 | ||||
-rw-r--r-- | sqlglotrs/src/tokenizer.rs | 18 |
3 files changed, 4 insertions, 18 deletions
diff --git a/sqlglotrs/Cargo.lock b/sqlglotrs/Cargo.lock index 920ef8b..78e1f64 100644 --- a/sqlglotrs/Cargo.lock +++ b/sqlglotrs/Cargo.lock @@ -188,7 +188,7 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "sqlglotrs" -version = "0.1.1" +version = "0.1.2" dependencies = [ "pyo3", ] diff --git a/sqlglotrs/Cargo.toml b/sqlglotrs/Cargo.toml index 0c367d9..72910f8 100644 --- a/sqlglotrs/Cargo.toml +++ b/sqlglotrs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlglotrs" -version = "0.1.1" +version = "0.1.2" edition = "2021" [lib] diff --git a/sqlglotrs/src/tokenizer.rs b/sqlglotrs/src/tokenizer.rs index 94a8b08..2c90a65 100644 --- a/sqlglotrs/src/tokenizer.rs +++ b/sqlglotrs/src/tokenizer.rs @@ -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)?; |