aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/items/mod.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-01-30 19:53:19 +0000
committerAleksey Kladov <[email protected]>2018-01-30 19:53:19 +0000
commit197a2e6fefd45627920cfb9bbca24b446e5a7c89 (patch)
tree04fbad2a682433c6b23ec0c09cccd0216a89e21f /src/parser/event_parser/grammar/items/mod.rs
parent94caa9d3a2c645df5c0f2d332bc001831119484d (diff)
G: type_parameter_list
Diffstat (limited to 'src/parser/event_parser/grammar/items/mod.rs')
-rw-r--r--src/parser/event_parser/grammar/items/mod.rs26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/parser/event_parser/grammar/items/mod.rs b/src/parser/event_parser/grammar/items/mod.rs
index 0a50fffc1..4d8783735 100644
--- a/src/parser/event_parser/grammar/items/mod.rs
+++ b/src/parser/event_parser/grammar/items/mod.rs
@@ -103,8 +103,32 @@ fn type_param_list(p: &mut Parser) {
103 assert!(p.at(IDENT)); 103 assert!(p.at(IDENT));
104 let m = p.start(); 104 let m = p.start();
105 p.bump(); 105 p.bump();
106 if p.eat(COLON) {
107 loop {
108 let has_paren = p.eat(L_PAREN);
109 p.eat(QUESTION);
110 if p.at(FOR_KW) {
111 //TODO
112 }
113 if p.at(LIFETIME) {
114 p.bump();
115 } else if paths::is_path_start(p) {
116 paths::type_path(p);
117 } else {
118 break;
119 }
120 if has_paren {
121 p.expect(R_PAREN);
122 }
123 if !p.eat(PLUS) {
124 break;
125 }
126 }
127 }
128 if p.at(EQ) {
129 types::type_ref(p)
130 }
106 m.complete(p, TYPE_PARAM); 131 m.complete(p, TYPE_PARAM);
107 //TODO: bounds
108 } 132 }
109} 133}
110 134