Commit 8b3a6bc
committed
Support identifiers starting with digits in lexer
ClickHouse allows identifiers like '1alias1name1' as aliases after AS.
The lexer now recognizes these as identifiers rather than treating the
leading digits as a NUMBER token followed by an IDENT token.
The change adds a check in readNumberOrIdent to detect when digits are
directly followed by letters (excluding exponent notation like 1e5 and
base prefixes like 0x, 0b, 0o).1 parent f8d2efd commit 8b3a6bc
File tree
2 files changed
+17
-5
lines changed- lexer
- parser/testdata/01460_allow_dollar_and_number_in_identifier
2 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
769 | 785 | | |
770 | 786 | | |
771 | 787 | | |
| |||
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