aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src/grammar.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2020-12-15 18:23:51 +0000
committerLukas Wirth <[email protected]>2020-12-16 13:16:09 +0000
commitdd496223f50232fe98312ee8edc89eb4b5ee3d85 (patch)
tree4d50c04ca78f9458ab536ff1edee76eba6ab1957 /crates/parser/src/grammar.rs
parentd34611633b3b2404188b9e12b08c5def589808c2 (diff)
Node-ify lifetimes
Diffstat (limited to 'crates/parser/src/grammar.rs')
-rw-r--r--crates/parser/src/grammar.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs
index 116b991a8..23039eba4 100644
--- a/crates/parser/src/grammar.rs
+++ b/crates/parser/src/grammar.rs
@@ -283,6 +283,13 @@ fn name_ref_or_index(p: &mut Parser) {
283 m.complete(p, NAME_REF); 283 m.complete(p, NAME_REF);
284} 284}
285 285
286fn lifetime(p: &mut Parser) {
287 assert!(p.at(LIFETIME_IDENT));
288 let m = p.start();
289 p.bump(LIFETIME_IDENT);
290 m.complete(p, LIFETIME);
291}
292
286fn error_block(p: &mut Parser, message: &str) { 293fn error_block(p: &mut Parser, message: &str) {
287 assert!(p.at(T!['{'])); 294 assert!(p.at(T!['{']));
288 let m = p.start(); 295 let m = p.start();