File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,16 @@ impl<'a> LexedStr<'a> {
4343 res. was_joint ( ) ;
4444 }
4545 res. push ( kind) ;
46- }
47- if kind == SyntaxKind :: FLOAT_NUMBER {
4846 // we set jointness for floating point numbers as a hack to inform the
4947 // parser about whether we have a `0.` or `0.1` style float
50- if self . text ( i ) . split_once ( '.' ) . map_or ( false , | ( _ , it ) | it . is_empty ( ) ) {
51- was_joint = false ;
52- } else {
53- was_joint = true ;
48+ if kind == SyntaxKind :: FLOAT_NUMBER {
49+ if ! self . text ( i ) . split_once ( '.' ) . map_or ( true , | ( _ , it ) | it . is_empty ( ) ) {
50+ res . was_joint ( ) ;
51+ }
5452 }
55- } else {
56- was_joint = true ;
5753 }
54+
55+ was_joint = true ;
5856 }
5957 }
6058 res
@@ -202,7 +200,7 @@ impl Builder<'_, '_> {
202200 ( self . sink ) ( StrStep :: Token { kind : SyntaxKind :: DOT , text : "." } ) ;
203201
204202 if has_pseudo_dot {
205- assert ! ( right. is_empty( ) ) ;
203+ assert ! ( right. is_empty( ) , "{left}.{right}" ) ;
206204 self . state = State :: Normal ;
207205 } else {
208206 ( self . sink ) ( StrStep :: Enter { kind : SyntaxKind :: NAME_REF } ) ;
You can’t perform that action at this time.
0 commit comments