From dd496223f50232fe98312ee8edc89eb4b5ee3d85 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 15 Dec 2020 19:23:51 +0100 Subject: Node-ify lifetimes --- xtask/Cargo.toml | 4 ++-- xtask/src/ast_src.rs | 3 ++- xtask/src/codegen/gen_syntax.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'xtask') diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 2ef956485..78a0b54ba 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -15,8 +15,8 @@ flate2 = "1.0" pico-args = "0.3.1" proc-macro2 = "1.0.8" quote = "1.0.2" -ungrammar = "1.1.3" +ungrammar = "1.4" walkdir = "2.3.1" -write-json = "0.1.0" +write-json = "0.1.0" xshell = "0.1" # Avoid adding more dependencies to this crate diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 72a4c10f5..a69ced5cc 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs @@ -76,7 +76,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { "ERROR", "IDENT", "WHITESPACE", - "LIFETIME", + "LIFETIME_IDENT", "COMMENT", "SHEBANG", "L_DOLLAR", @@ -202,6 +202,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { "TYPE_PARAM", "CONST_PARAM", "GENERIC_ARG_LIST", + "LIFETIME", "LIFETIME_ARG", "TYPE_ARG", "ASSOC_TYPE_ARG", diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 44460effa..eb524d85a 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -380,7 +380,7 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result { macro_rules! T { #([#punctuation_values] => { $crate::SyntaxKind::#punctuation };)* #([#all_keywords_idents] => { $crate::SyntaxKind::#all_keywords };)* - [lifetime] => { $crate::SyntaxKind::LIFETIME }; + [lifetime_ident] => { $crate::SyntaxKind::LIFETIME_IDENT }; [ident] => { $crate::SyntaxKind::IDENT }; [shebang] => { $crate::SyntaxKind::SHEBANG }; } -- cgit v1.2.3