Fix codegen and tests to new API changes.

This commit is contained in:
Stephen Chung
2020-08-06 14:10:27 +08:00
parent 4465a44673
commit dd6b6cd49f
5 changed files with 82 additions and 80 deletions

View File

@@ -26,7 +26,7 @@ pub(crate) fn generate_body(
let mut gen_fn_tokens: Vec<proc_macro2::TokenStream> = Vec::new();
for function in fns {
let fn_token_name = syn::Ident::new(
&format!("{}__Token", function.name().to_string()),
&format!("{}_Token", function.name().to_string()),
function.name().span(),
);
let fn_literal =
@@ -90,7 +90,7 @@ pub(crate) fn generate_body(
#[allow(unused_imports)]
use super::*;
#[allow(unused_mut)]
pub fn rhai_module__generate() -> Module {
pub fn rhai_module_generate() -> Module {
let mut m = Module::new();
#(#set_fn_stmts)*
#(#set_const_stmts)*