Revise using string interpolation.

This commit is contained in:
Stephen Chung
2021-04-04 23:22:45 +08:00
parent bc9c1ab850
commit 0807c474a1
16 changed files with 33 additions and 32 deletions

View File

@@ -81,7 +81,7 @@ fn test_call_fn_args() -> Result<(), Box<EvalAltResult>> {
let ast = engine.compile(
r#"
fn hello(x, y, z) {
if x { "hello " + y } else { y + z }
if x { `hello ${y}` } else { y + z }
}
"#,
)?;

View File

@@ -315,7 +315,7 @@ fn test_module_from_ast() -> Result<(), Box<EvalAltResult>> {
// Final variable values become constant module variable values
foo = calc(foo);
hello = "hello, " + foo + " worlds!";
hello = `hello, ${foo} worlds!`;
export
x as abc,