From a1d341085eed96d567329a30f2cf57c95fe6f071 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 13 Jul 2022 14:46:55 +0800 Subject: auto add search path for cmd tools. --- spec/inputs/macro-export.yue | 2 -- spec/inputs/macro-teal.yue | 2 +- spec/inputs/macro.yue | 3 --- spec/inputs/teal-lang.yue | 5 +---- spec/outputs/macro.lua | 2 +- 5 files changed, 3 insertions(+), 11 deletions(-) (limited to 'spec') diff --git a/spec/inputs/macro-export.yue b/spec/inputs/macro-export.yue index adc71da..ff0d273 100644 --- a/spec/inputs/macro-export.yue +++ b/spec/inputs/macro-export.yue @@ -1,5 +1,3 @@ -$ -> package.path = "?.lua;./spec/inputs/?.lua" - import "macro-todo" as $ import "macro-todo" as {$, :$todo} diff --git a/spec/inputs/macro-teal.yue b/spec/inputs/macro-teal.yue index 951e882..a443614 100644 --- a/spec/inputs/macro-teal.yue +++ b/spec/inputs/macro-teal.yue @@ -2,7 +2,7 @@ $ -> import "yue" as {:options} if options.tl_enabled options.target_extension = "tl" - package.path ..= "?.lua;./spec/lib/?.lua" + package.path ..= ";./spec/lib/?.lua" macro to_lua = (code)-> "require('yue').to_lua(#{code}, reserve_line_number:false, same_module:true)" diff --git a/spec/inputs/macro.yue b/spec/inputs/macro.yue index e4b0fc8..7bbb06d 100644 --- a/spec/inputs/macro.yue +++ b/spec/inputs/macro.yue @@ -1,6 +1,3 @@ -$ -> - package.path = "?.lua;./spec/inputs/?.lua" - import "macro-export" as { $, -- import all macros $config: $myconfig, -- rename macro $config to $myconfig diff --git a/spec/inputs/teal-lang.yue b/spec/inputs/teal-lang.yue index 68b2dd1..b28c915 100644 --- a/spec/inputs/teal-lang.yue +++ b/spec/inputs/teal-lang.yue @@ -1,7 +1,4 @@ -$ -> - package.path = "?.lua;./spec/inputs/?.lua" - -import "macro-teal" as {$} +import "macro-teal" as $ $local "a:{string:number}", {value:123} $local "b:number", a.value diff --git a/spec/outputs/macro.lua b/spec/outputs/macro.lua index 5917f43..c19b2d7 100644 --- a/spec/outputs/macro.lua +++ b/spec/outputs/macro.lua @@ -277,7 +277,7 @@ print((setmetatable({ return 998 end })) -print("current line: " .. tostring(271)); +print("current line: " .. tostring(268)); -- TODO do print(1) -- cgit v1.2.3-55-g6feb