diff options
author | Li Jin <dragon-fly@qq.com> | 2021-11-22 10:05:39 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-11-22 10:05:39 +0800 |
commit | 825b5d96f8a0d146615f0c6a76feab46da9baa60 (patch) | |
tree | df450bac65848dddc4929383fdd0a48485254484 /spec/inputs/macro-todo.yue | |
parent | 125f709b065acb35bcd216001720c0bb4635dd25 (diff) | |
download | yuescript-0.9.1.tar.gz yuescript-0.9.1.tar.bz2 yuescript-0.9.1.zip |
update macro spec and builtin Lua.v0.9.1
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..8477e5a --- /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 $MODULE, $LINE, #{msg}" | ||
11 | else | ||
12 | "$todoInner $MODULE, $LINE" | ||
13 | |||