diff options
author | Lukas Wirth <[email protected]> | 2020-12-15 18:23:51 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2020-12-16 13:16:09 +0000 |
commit | dd496223f50232fe98312ee8edc89eb4b5ee3d85 (patch) | |
tree | 4d50c04ca78f9458ab536ff1edee76eba6ab1957 /crates/parser/src/grammar.rs | |
parent | d34611633b3b2404188b9e12b08c5def589808c2 (diff) |
Node-ify lifetimes
Diffstat (limited to 'crates/parser/src/grammar.rs')
-rw-r--r-- | crates/parser/src/grammar.rs | 7 |
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 | ||
286 | fn 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 | |||
286 | fn error_block(p: &mut Parser, message: &str) { | 293 | fn 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(); |