diff options
author | Li Jin <dragon-fly@qq.com> | 2023-12-07 23:49:48 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2023-12-07 23:55:16 +0800 |
commit | 514b9f97febe8920a78d6078b092fe84b859a963 (patch) | |
tree | 8c76ba7579f69db7e2c899e4713009b910e0fa89 /spec/inputs/macro_teal.yue | |
parent | a1d719e3bbfe8cd39c05d2a8f49143b9e814f876 (diff) | |
download | yuescript-514b9f97febe8920a78d6078b092fe84b859a963.tar.gz yuescript-514b9f97febe8920a78d6078b092fe84b859a963.tar.bz2 yuescript-514b9f97febe8920a78d6078b092fe84b859a963.zip |
changed the if-assignment syntax to prevent some errors.v0.21.0
Diffstat (limited to 'spec/inputs/macro_teal.yue')
-rw-r--r-- | spec/inputs/macro_teal.yue | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/inputs/macro_teal.yue b/spec/inputs/macro_teal.yue index a443614..0cfd862 100644 --- a/spec/inputs/macro_teal.yue +++ b/spec/inputs/macro_teal.yue | |||
@@ -8,7 +8,7 @@ macro to_lua = (code)-> | |||
8 | "require('yue').to_lua(#{code}, reserve_line_number:false, same_module:true)" | 8 | "require('yue').to_lua(#{code}, reserve_line_number:false, same_module:true)" |
9 | 9 | ||
10 | macro trim = (name)-> | 10 | macro trim = (name)-> |
11 | "if result = #{name}\\match '[\\'\"](.*)[\\'\"]' then result else #{name}" | 11 | "if result := #{name}\\match '[\\'\"](.*)[\\'\"]' then result else #{name}" |
12 | 12 | ||
13 | export macro local = (decl, value = nil)-> | 13 | export macro local = (decl, value = nil)-> |
14 | import "yue" as {options:{:tl_enabled}} | 14 | import "yue" as {options:{:tl_enabled}} |