You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can do 0b11110000 and 0b_11110000 but not 0b1111_0000.
PRQL input
filter foo == 0b11110000 # Worksfilter foo == 0b_11110000 # Worksfilter foo == 0b1111_0000 # Does not work
filter foo == 0b1111_0000_1111_0000 # Does not work
Reproduced on main: 0b1111_0000 lexes as 0b1111 followed by the identifier _0000, so compilation fails with Unknown name _0000. The same happens with 0x and 0o (e.g. 0xdead_beef). The prefixed-number lexer accepted one optional _ right after the prefix and then digits only (lexer/mod.rs), unlike decimal literals, which allow _ anywhere after the first digit.
A fix is on branch fix/issue-6518 (commit 1a4d919). After the first digit it accepts digits or _, and it strips underscores before parsing, so 0b1111_0000_1111_0000 compiles to 61680. The new cases in lexer::test::numbers fail without the change and pass with it. I couldn't open the PR because the bot's PR/issue creation allowance is exhausted until 2026-11-02T06:45Z (tracked in #6519). A maintainer can open a PR from the branch, or a later run can open it once the allowance resets.
Activity
prql-bot commentedon Nov 1, 2026
Reproduced on
main:0b1111_0000lexes as0b1111followed by the identifier_0000, so compilation fails withUnknown name _0000. The same happens with0xand0o(e.g.0xdead_beef). The prefixed-number lexer accepted one optional_right after the prefix and then digits only (lexer/mod.rs), unlike decimal literals, which allow_anywhere after the first digit.A fix is on branch
fix/issue-6518(commit 1a4d919). After the first digit it accepts digits or_, and it strips underscores before parsing, so0b1111_0000_1111_0000compiles to61680. The new cases inlexer::test::numbersfail without the change and pass with it. I couldn't open the PR because the bot's PR/issue creation allowance is exhausted until 2026-11-02T06:45Z (tracked in #6519). A maintainer can open a PR from the branch, or a later run can open it once the allowance resets.