Currently the grammar contains const_literal as part of the primary_expression rule. This is called by singular_expression. This means it's valid in the grammar to parse 1.foo as the const_literal (1) from the primary expression and the .foo from the postfix_expression.
This doesn't happen in tree-sitter because the float regex is greedy and will consume the 1..
This, I believe, can be fixed by moving const_literal into singular_expression as an entry by itself. I don't see any case where a number can be followed by a postfix_expression and singular_expression is the only caller of primary_expression.
Currently the grammar contains
const_literalas part of theprimary_expressionrule. This is called bysingular_expression. This means it's valid in the grammar to parse1.fooas theconst_literal(1) from the primary expression and the.foofrom thepostfix_expression.This doesn't happen in tree-sitter because the float regex is greedy and will consume the
1..This, I believe, can be fixed by moving
const_literalintosingular_expressionas an entry by itself. I don't see any case where a number can be followed by apostfix_expressionandsingular_expressionis the only caller ofprimary_expression.