Commit f304b1d
Support underscores in binary and octal literals
Added support for underscore digit separators in binary literals
(0b0010_0100_0111) and octal literals (0o755_644) to match ClickHouse's
behavior for numeric literals with underscores.
Updated both readNumber and readNumberOrIdent functions in the lexer
to handle underscores in binary and octal number formats.
Fixes stmt6 in 02354_numeric_literals_with_underscores.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 2fa01e3 commit f304b1d
File tree
2 files changed
+9
-12
lines changed- lexer
- parser/testdata/02354_numeric_literals_with_underscores
2 files changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
889 | | - | |
| 889 | + | |
890 | 890 | | |
891 | 891 | | |
892 | | - | |
| 892 | + | |
893 | 893 | | |
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
898 | | - | |
| 898 | + | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
| 901 | + | |
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
| |||
1088 | 1088 | | |
1089 | 1089 | | |
1090 | 1090 | | |
| 1091 | + | |
1091 | 1092 | | |
1092 | 1093 | | |
1093 | | - | |
| 1094 | + | |
1094 | 1095 | | |
1095 | 1096 | | |
1096 | 1097 | | |
| |||
1100 | 1101 | | |
1101 | 1102 | | |
1102 | 1103 | | |
1103 | | - | |
| 1104 | + | |
1104 | 1105 | | |
1105 | 1106 | | |
1106 | 1107 | | |
1107 | | - | |
| 1108 | + | |
1108 | 1109 | | |
1109 | 1110 | | |
1110 | 1111 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
0 commit comments