We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
.
1 parent 161f1d4 commit 5c70631Copy full SHA for 5c70631
1 file changed
parser/src/lexer.rs
@@ -357,6 +357,12 @@ where
357
if self.chr0 == Some('.') || self.at_exponent() {
358
// Take '.':
359
if self.chr0 == Some('.') {
360
+ if self.chr1 == Some('_') {
361
+ return Err(LexicalError {
362
+ error: LexicalErrorType::OtherError("Invalid Syntax".to_string()),
363
+ location: self.get_pos(),
364
+ });
365
+ }
366
value_text.push(self.next_char().unwrap());
367
value_text.push_str(&self.radix_run(10));
368
}
@@ -416,6 +422,7 @@ where
416
422
/// like this: '1_2_3_4' == '1234'
417
423
fn radix_run(&mut self, radix: u32) -> String {
418
424
let mut value_text = String::new();
425
+
419
426
loop {
420
427
if let Some(c) = self.take_number(radix) {
421
428
value_text.push(c);
0 commit comments