From f19ba3e5ba71adf8092252bac21381ba75870792 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 17 Feb 2021 12:17:44 +0800 Subject: fix macro issue. --- spec/inputs/macro.yue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/inputs/macro.yue b/spec/inputs/macro.yue index eb3cf75..6a255fe 100644 --- a/spec/inputs/macro.yue +++ b/spec/inputs/macro.yue @@ -226,17 +226,18 @@ $chainB( ) macro chainC = (...)-> - import "moonp" as {:to_lua} + import "yue" as {:to_lua} callable = nil config = { implicit_return_root: false reserve_line_number: false } for item in *{...} + itemCodes = to_lua(item,config)\gsub '%s*$','' if callable? - callable = "#{callable}:#{to_lua(item,config)\gsub '%s*$',''}" + callable = "#{callable}:#{itemCodes}" else - callable = to_lua(item,config)\gsub '%s*$','' + callable = itemCodes { codes: $showMacro "chainC", callable type: "lua" -- cgit v1.2.3-55-g6feb