File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 282
282
//! `%`. The actual grammar for the formatting syntax is:
283
283
//!
284
284
//! ```text
285
- //! format_string := < text> [ maybe-format < text> ] *
286
- //! maybe-format := '{' '{' | '}' '}' | < format>
285
+ //! format_string := text [ maybe_format text ] *
286
+ //! maybe_format := '{' '{' | '}' '}' | format
287
287
//! format := '{' [ argument ] [ ':' format_spec ] '}'
288
288
//! argument := integer | identifier
289
289
//!
290
- //! format_spec := [[fill]align][sign]['#']['0'][width]['.' precision][ type]
290
+ //! format_spec := [[fill]align][sign]['#']['0'][width]['.' precision]type
291
291
//! fill := character
292
292
//! align := '<' | '^' | '>'
293
293
//! sign := '+' | '-'
294
294
//! width := count
295
295
//! precision := count | '*'
296
- //! type := identifier | '?' | ''
296
+ //! type := '' | '?' | 'x?' | 'X?' | identifier
297
297
//! count := parameter | integer
298
298
//! parameter := argument '$'
299
299
//! ```
300
+ //! In the above grammar, `text` may not contain any `'{'` or `'}'` characters.
300
301
//!
301
302
//! # Formatting traits
302
303
//!
You can’t perform that action at this time.
0 commit comments