fyrsta7 commented on code in PR #2426:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2426#discussion_r3836380906


##########
src/tokenizer.rs:
##########
@@ -1372,12 +1372,24 @@ impl<'a> Tokenizer<'a> {
                         ch.is_ascii_digit() || is_number_separator(ch, next_ch)
                     });
 
+                    if self.dialect.supports_numeric_literal_underscores()
+                        && chars.peek() == Some(&'_')
+                    {
+                        return self.tokenizer_error(chars.location(), 
"Unexpected character '_'");
+                    }

Review Comment:
   Thanks for pointing this out. You are right that the first check was 
redundant. I replaced the separate checks with one helper that validates 
separators consistently across integer, fractional, hexadecimal, and exponent 
parts, and added coverage for the related edge cases. The full test suite, 
Clippy, and formatting checks pass. Thanks again for the careful review.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to