diff options
author | Li Jin <dragon-fly@qq.com> | 2023-07-28 11:53:04 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2023-07-28 11:53:04 +0800 |
commit | 5497775534d20ba06ab9c13bc4db1c5bee877513 (patch) | |
tree | be68d03cf0928efca4a579125e4ba15ef3ab9325 /spec/inputs/macro_todo.yue | |
parent | f415df9617d251abd802257d9750618ccc71ca93 (diff) | |
download | yuescript-5497775534d20ba06ab9c13bc4db1c5bee877513.tar.gz yuescript-5497775534d20ba06ab9c13bc4db1c5bee877513.tar.bz2 yuescript-5497775534d20ba06ab9c13bc4db1c5bee877513.zip |
fix xpcall usages in different Lua version.
Diffstat (limited to 'spec/inputs/macro_todo.yue')
-rw-r--r-- | spec/inputs/macro_todo.yue | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/inputs/macro_todo.yue b/spec/inputs/macro_todo.yue new file mode 100644 index 0000000..752c9cb --- /dev/null +++ b/spec/inputs/macro_todo.yue | |||
@@ -0,0 +1,13 @@ | |||
1 | export macro todoInner = (module, line, msg)-> | ||
2 | print "TODO#{msg and ': ' .. msg or ''} in file #{module}, at line #{line}" | ||
3 | { | ||
4 | code: "-- TODO#{msg and ': ' .. msg or ''}" | ||
5 | type: "lua" | ||
6 | } | ||
7 | |||
8 | export macro todo = (msg)-> | ||
9 | if msg | ||
10 | "$todoInner $FILE, $LINE, #{msg}" | ||
11 | else | ||
12 | "$todoInner $FILE, $LINE" | ||
13 | |||