File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,22 @@ a single integer literal.
333
333
334
334
#### Floating-point literals
335
335
336
+ > ** <sup >Lexer</sup >**
337
+ > FLOAT_LITERAL :
338
+ >   ;  ;   ;  ; DEC_LITERAL ` . `
339
+ > _ (not immediately followed by ` . ` , ` _ ` or an identifier_ )
340
+ >   ;  ; | DEC_LITERAL FLOAT_EXPONENT
341
+ >   ;  ; | DEC_LITERAL ` . ` DEC_LITERAL FLOAT_EXPONENT<sup >?</sup >
342
+ >   ;  ; | DEC_LITERAL (` . ` DEC_LITERAL)<sup >?</sup >
343
+ > FLOAT_EXPONENT<sup >?</sup > FLOAT_SUFFIX
344
+ >
345
+ > FLOAT_EXPONENT :
346
+ >   ;  ; (` e ` |` E ` ) (` + ` |` - ` )?
347
+ > (DEC_DIGIT|` _ ` )<sup >\* </sup > DEC_DIGIT (DEC_DIGIT|` _ ` )<sup >\* </sup >
348
+ >
349
+ > FLOAT_SUFFIX :
350
+ >   ;  ; ` f32 ` | ` f64 `
351
+
336
352
A _ floating-point literal_ has one of two forms:
337
353
338
354
* A _ decimal literal_ followed by a period character ` U+002E ` (` . ` ). This is
You can’t perform that action at this time.
0 commit comments