From 5c5bde47fb759440d007c90fd83021de538120b8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 10 Apr 2020 17:06:57 +0200 Subject: Rename some tokens --- xtask/src/ast_src.rs | 18 +++++++++--------- xtask/src/codegen/gen_syntax.rs | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'xtask/src') diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 7a20d9991..8c0b5f5a8 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs @@ -11,7 +11,7 @@ pub(crate) struct KindsSrc<'a> { pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { punct: &[ - (";", "SEMI"), + (";", "SEMICOLON"), (",", "COMMA"), ("(", "L_PAREN"), (")", "R_PAREN"), @@ -35,15 +35,15 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { ("%", "PERCENT"), ("_", "UNDERSCORE"), (".", "DOT"), - ("..", "DOTDOT"), - ("...", "DOTDOTDOT"), - ("..=", "DOTDOTEQ"), + ("..", "DOT2"), + ("...", "DOT3"), + ("..=", "DOT2EQ"), (":", "COLON"), - ("::", "COLONCOLON"), + ("::", "COLON2"), ("=", "EQ"), - ("==", "EQEQ"), + ("==", "EQ2"), ("=>", "FAT_ARROW"), - ("!", "EXCL"), + ("!", "BANG"), ("!=", "NEQ"), ("-", "MINUS"), ("->", "THIN_ARROW"), @@ -57,8 +57,8 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { ("/=", "SLASHEQ"), ("*=", "STAREQ"), ("%=", "PERCENTEQ"), - ("&&", "AMPAMP"), - ("||", "PIPEPIPE"), + ("&&", "AMP2"), + ("||", "PIPE2"), ("<<", "SHL"), (">>", "SHR"), ("<<=", "SHLEQ"), diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index ff290bb33..ec1f6ad8a 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -324,10 +324,10 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result { #[macro_export] macro_rules! T { - #((#punctuation_values) => { $crate::SyntaxKind::#punctuation };)* - #((#all_keywords_idents) => { $crate::SyntaxKind::#all_keywords };)* - (lifetime) => { $crate::SyntaxKind::LIFETIME }; - (ident) => { $crate::SyntaxKind::IDENT }; + #([#punctuation_values] => { $crate::SyntaxKind::#punctuation };)* + #([#all_keywords_idents] => { $crate::SyntaxKind::#all_keywords };)* + [lifetime] => { $crate::SyntaxKind::LIFETIME }; + [ident] => { $crate::SyntaxKind::IDENT }; } }; -- cgit v1.2.3