aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/items/mod.rs
diff options
context:
space:
mode:
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