diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-19 18:03:36 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-19 18:03:36 +0000 |
commit | 1c296d54e3dcc36c1a778873f26035000a352ba2 (patch) | |
tree | 0a6ce660ee32080287284c93bffaaaada91f3584 /crates/ra_syntax/src/grammar.ron | |
parent | bade91db081a3465dea3547ab8ab669f78fde9dc (diff) | |
parent | 5f3509e140d19b989db418a00ac6778c622cde5d (diff) |
Merge #576
576: Beginnings of generics r=matklad a=flodiebold
This implements the beginnings of the generics infrastructure; generic parameters for structs work and are correctly substituted in fields. Functions and methods aren't handled at all yet (as the tests show).
The name resolution in `ty` really needs refactoring now, I hope to do that next ;)
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/grammar.ron')
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index fc47c36d3..0385183fd 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -597,8 +597,16 @@ Grammar( | |||
597 | ] | 597 | ] |
598 | ), | 598 | ), |
599 | "PathSegment": ( | 599 | "PathSegment": ( |
600 | options: [ "NameRef" ] | 600 | options: [ "NameRef", "TypeArgList" ] |
601 | ), | 601 | ), |
602 | "TypeArgList": (collections: [ | ||
603 | ["type_args", "TypeArg"], | ||
604 | ["lifetime_args", "LifetimeArg"], | ||
605 | ["assoc_type_args", "AssocTypeArg"], | ||
606 | ]), | ||
607 | "TypeArg": (options: ["TypeRef"]), | ||
608 | "AssocTypeArg": (options: ["NameRef", "TypeRef"]), | ||
609 | "LifetimeArg": (options: ["Lifetime"]), | ||
602 | "Comment": ( traits: ["AstToken"] ), | 610 | "Comment": ( traits: ["AstToken"] ), |
603 | "Whitespace": ( traits: ["AstToken"] ), | 611 | "Whitespace": ( traits: ["AstToken"] ), |
604 | }, | 612 | }, |