diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 07:23:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 07:23:18 +0000 |
commit | 9c5cf7fc4a20988d0eda33e4a3afdf7168c05104 (patch) | |
tree | 85160e0a3a39feede46b7546566279525b3af373 /sqlglotrs/src/tokenizer.rs | |
parent | Releasing debian version 25.31.4-1. (diff) | |
download | sqlglot-9c5cf7fc4a20988d0eda33e4a3afdf7168c05104.tar.xz sqlglot-9c5cf7fc4a20988d0eda33e4a3afdf7168c05104.zip |
Merging upstream version 25.32.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | sqlglotrs/src/tokenizer.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sqlglotrs/src/tokenizer.rs b/sqlglotrs/src/tokenizer.rs index beff96e..8228b5a 100644 --- a/sqlglotrs/src/tokenizer.rs +++ b/sqlglotrs/src/tokenizer.rs @@ -395,6 +395,12 @@ impl<'a> TokenizerState<'a> { .push(self.text()[comment_start_size..].to_string()); } + if comment_start == self.settings.hint_start + && self.tokens.last().is_some() + && self.settings.tokens_preceding_hint.contains(&self.tokens.last().unwrap().token_type) { + self.add(self.token_types.hint, None)?; + } + // Leading comment is attached to the succeeding token, whilst trailing comment to the preceding. // Multiple consecutive comments are preserved by appending them to the current comments list. if Some(comment_start_line) == self.previous_token_line { |