diff options
Diffstat (limited to 'crates/libsyntax2/src/grammar.ron')
-rw-r--r-- | crates/libsyntax2/src/grammar.ron | 58 |
1 files changed, 51 insertions, 7 deletions
diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron index a753d5e48..3a125ace6 100644 --- a/crates/libsyntax2/src/grammar.ron +++ b/crates/libsyntax2/src/grammar.ron | |||
@@ -241,11 +241,16 @@ Grammar( | |||
241 | ["modules", "Module"], | 241 | ["modules", "Module"], |
242 | ] | 242 | ] |
243 | ), | 243 | ), |
244 | "FnDef": ( traits: [ | 244 | "FnDef": ( |
245 | "NameOwner", | 245 | traits: [ |
246 | "TypeParamsOwner", | 246 | "NameOwner", |
247 | "AttrsOwner", | 247 | "TypeParamsOwner", |
248 | ] ), | 248 | "AttrsOwner", |
249 | ], | ||
250 | options: [ | ||
251 | ["param_list", "ParamList"] | ||
252 | ], | ||
253 | ), | ||
249 | "StructDef": ( | 254 | "StructDef": ( |
250 | traits: [ | 255 | traits: [ |
251 | "NameOwner", | 256 | "NameOwner", |
@@ -393,13 +398,52 @@ Grammar( | |||
393 | ], | 398 | ], |
394 | ), | 399 | ), |
395 | 400 | ||
401 | "RefPat": (), | ||
402 | "BindPat": ( traits: ["NameOwner"] ), | ||
403 | "PlaceholderPat": (), | ||
404 | "PathPat": (), | ||
405 | "StructPat": (), | ||
406 | "FieldPatList": (), | ||
407 | "TupleStructPat": (), | ||
408 | "TuplePat": (), | ||
409 | "SlicePat": (), | ||
410 | "RangePat": (), | ||
411 | |||
412 | "Pat": ( | ||
413 | enum: [ | ||
414 | "RefPat", | ||
415 | "BindPat", | ||
416 | "PlaceholderPat", | ||
417 | "PathPat", | ||
418 | "StructPat", | ||
419 | "FieldPatList", | ||
420 | "TupleStructPat", | ||
421 | "TuplePat", | ||
422 | "SlicePat", | ||
423 | "RangePat", | ||
424 | ], | ||
425 | ), | ||
426 | |||
396 | "Name": (), | 427 | "Name": (), |
397 | "NameRef": (), | 428 | "NameRef": (), |
398 | "Attr": ( options: [ ["value", "TokenTree"] ] ), | 429 | "Attr": ( options: [ ["value", "TokenTree"] ] ), |
399 | "TokenTree": (), | 430 | "TokenTree": (), |
400 | "TypeParamList": ( collections: [ ["type_params", "TypeParam" ] ]), | 431 | "TypeParamList": ( collections: [ ["type_params", "TypeParam" ] ]), |
401 | "TypeParam": ( traits: ["NameOwner"]), | 432 | "TypeParam": ( traits: ["NameOwner"] ), |
402 | "WhereClause": (), | 433 | "WhereClause": (), |
403 | "Block": (), | 434 | "LetStmt": ( options: [ ["pat", "Pat"] ]), |
435 | "Block": ( | ||
436 | collections: [ | ||
437 | ["let_stmts", "LetStmt"], | ||
438 | ] | ||
439 | ), | ||
440 | "ParamList": ( | ||
441 | collections: [ | ||
442 | ["params", "Param"] | ||
443 | ] | ||
444 | ), | ||
445 | "Param": ( | ||
446 | options: [["pat", "Pat"]], | ||
447 | ) | ||
404 | }, | 448 | }, |
405 | ) | 449 | ) |