Skip to content

Commit

Permalink
feat: support C23 number suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Aug 13, 2023
1 parent b84c087 commit d7e069c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ module.exports = grammar({
hexDigits,
)),
)),
repeat(choice('u', 'l', 'U', 'L', 'f', 'F')),
/[uUlLwWfFbBdD]*/,
));
},

Expand Down
6 changes: 6 additions & 0 deletions test/corpus/expressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ double a = {
123.456e-67,
.1E4f,
0x10.1p0,
0X1, 0B1,
2.0dd, 5wb,
};

--------------------------------------------------------------------------------
Expand All @@ -38,6 +40,10 @@ double a = {
(number_literal)
(number_literal)
(number_literal)
(number_literal)
(number_literal)
(number_literal)
(number_literal)
(number_literal)))))

================================================================================
Expand Down

0 comments on commit d7e069c

Please sign in to comment.