Section headers

This commit is contained in:
Aleksey Kladov 2020-07-31 21:56:52 +02:00
parent 1914d0aa7b
commit 675e86becf

View file

@ -1,3 +1,7 @@
//*************************//
// Names, Paths and Macros //
//*************************//
Name = Name =
'ident' 'ident'
@ -50,6 +54,10 @@ MacroStmts =
statements:Stmt* statements:Stmt*
Expr? Expr?
//*************************//
// Items //
//*************************//
SourceFile = SourceFile =
'shebang'? 'shebang'?
Attr* Attr*
@ -245,6 +253,10 @@ Visibility =
Attr = Attr =
'#' '!'? '[' Path ('=' Literal | TokenTree)? ']' '#' '!'? '[' Path ('=' Literal | TokenTree)? ']'
//****************************//
// Statements and Expressions //
//****************************//
Stmt = Stmt =
ExprStmt ExprStmt
| Item | Item
@ -434,6 +446,10 @@ AwaitExpr =
BoxExpr = BoxExpr =
Attr* 'box' Expr Attr* 'box' Expr
//*************************//
// Types //
//*************************//
Type = Type =
ArrayType ArrayType
| DynTraitType | DynTraitType
@ -495,6 +511,10 @@ TypeBound =
'lifetime' 'lifetime'
| '?'? Type | '?'? Type
//************************//
// Patterns //
//************************//
Pat = Pat =
IdentPat IdentPat
| BoxPat | BoxPat