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> {
43
43
res. was_joint ( ) ;
44
44
}
45
45
res. push ( kind) ;
46
- }
47
- if kind == SyntaxKind :: FLOAT_NUMBER {
48
46
// we set jointness for floating point numbers as a hack to inform the
49
47
// 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
+ }
54
52
}
55
- } else {
56
- was_joint = true ;
57
53
}
54
+
55
+ was_joint = true ;
58
56
}
59
57
}
60
58
res
@@ -202,7 +200,7 @@ impl Builder<'_, '_> {
202
200
( self . sink ) ( StrStep :: Token { kind : SyntaxKind :: DOT , text : "." } ) ;
203
201
204
202
if has_pseudo_dot {
205
- assert ! ( right. is_empty( ) ) ;
203
+ assert ! ( right. is_empty( ) , "{left}.{right}" ) ;
206
204
self . state = State :: Normal ;
207
205
} else {
208
206
( self . sink ) ( StrStep :: Enter { kind : SyntaxKind :: NAME_REF } ) ;
You can’t perform that action at this time.
0 commit comments