diff options
| author | ruki <[email protected]> | 2016-12-26 08:59:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-01-06 17:20:08 +0800 |
| commit | cf15bd5f7162d6f009ff749e4fe6a29bd22cdda2 (patch) | |
| tree | 82e72a1f6a2a5a84b3cdc8b1ee9d00eeab726a12 /xmake/core/project/task.lua | |
| parent | 41b436bf13e65ea0a9eb3e826d944a626e387df2 (diff) | |
define apis for all scopes again
Diffstat (limited to 'xmake/core/project/task.lua')
| -rw-r--r-- | xmake/core/project/task.lua | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/xmake/core/project/task.lua b/xmake/core/project/task.lua index a0174e9e8..1d1bf37dd 100644 --- a/xmake/core/project/task.lua +++ b/xmake/core/project/task.lua @@ -160,20 +160,22 @@ function task._interpreter() -- init interpreter local interp = interpreter.new() assert(interp) - - -- register api: task() - interp:api_register_scope("task") - - -- register api: set_category() - -- - -- category: main, action, plugin, task (default) - interp:api_register_set_values("task", "category") - - -- register api: set_menu() - interp:api_register_set_values("task", "menu") - - -- register api: on_run() - interp:api_register_on_script("task", "run") + + -- define apis + interp:api_define + { + values = + { + -- task.set_xxx + "task.set_category" -- main, action, plugin, task (default) + , "task.set_menu" + } + , script = + { + -- task.on_xxx + "task.on_run" + } + } -- set filter interp:filter_set(filter.new(function (variable) |
