From 4b26fa90f5c5500db1089ea922a0d293b6f82735 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Mon, 4 Dec 2023 22:52:42 +0900 Subject: [PATCH] Rename --- macro/src/dialect/input.rs | 8 ++++---- macro/src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/macro/src/dialect/input.rs b/macro/src/dialect/input.rs index f24eda5e51..2b1aea33b1 100644 --- a/macro/src/dialect/input.rs +++ b/macro/src/dialect/input.rs @@ -31,14 +31,14 @@ impl DialectInput { impl Parse for DialectInput { fn parse(input: syn::parse::ParseStream) -> syn::Result { let mut name = None; - let mut tablegen = None; + let mut table_gen = None; let mut td_file = None; let mut includes = vec![]; for item in Punctuated::::parse_terminated(input)? { match item { InputField::Name(field) => name = Some(field.value()), - InputField::TableGen(td) => tablegen = Some(td.value()), + InputField::TableGen(td) => table_gen = Some(td.value()), InputField::TdFile(file) => td_file = Some(file.value()), InputField::Includes(field) => { includes = field.into_iter().map(|literal| literal.value()).collect() @@ -48,7 +48,7 @@ impl Parse for DialectInput { Ok(Self { name: name.ok_or(input.error("dialect name required"))?, - table_gen: tablegen, + table_gen: table_gen, td_file, includes, }) @@ -70,7 +70,7 @@ impl Parse for InputField { if ident == format_ident!("name") { Ok(Self::Name(input.parse()?)) - } else if ident == format_ident!("tablegen") { + } else if ident == format_ident!("table_gen") { Ok(Self::TableGen(input.parse()?)) } else if ident == format_ident!("td_file") { Ok(Self::TdFile(input.parse()?)) diff --git a/macro/src/lib.rs b/macro/src/lib.rs index 64e01cf6e0..db11c8a20e 100644 --- a/macro/src/lib.rs +++ b/macro/src/lib.rs @@ -20,7 +20,7 @@ use syn::parse_macro_input; /// ```rust /// melior::dialect! { /// name: "func", -/// tablegen: r#"include "mlir/Dialect/Func/IR/FuncOps.td""# +/// table_gen: r#"include "mlir/Dialect/Func/IR/FuncOps.td""# /// } /// ``` #[proc_macro]