Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const PREC = {
};
const DEC_DIGITS = token(sep1(/[0-9]+/, /_+/));
const HEX_DIGITS = token(sep1(/[0-9a-fA-F]+/, /_+/));
const BIN_DIGITS = token(sep1(/[01]/, /_+/));
const BIN_DIGITS = token(sep1(/[01]+/, /_+/));
const REAL_EXPONENT = token(seq(/[eE]/, optional(/[+-]/), DEC_DIGITS));

module.exports = grammar({
Expand Down
4 changes: 2 additions & 2 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6130,7 +6130,7 @@
"members": [
{
"type": "PATTERN",
"value": "[01]"
"value": "[01]+"
},
{
"type": "REPEAT",
Expand All @@ -6143,7 +6143,7 @@
},
{
"type": "PATTERN",
"value": "[01]"
"value": "[01]+"
}
]
}
Expand Down
2 changes: 2 additions & 0 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -19332,6 +19332,8 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
case 519:
ACCEPT_TOKEN(sym_bin_literal);
if (lookahead == '_') ADVANCE(172);
if (lookahead == '0' ||
lookahead == '1') ADVANCE(519);
END_STATE();
case 520:
ACCEPT_TOKEN(anon_sym_SQUOTE);
Expand Down