| 123456789101112131415161718 |
- /** 语句:while 循环(解析在此,执行在 sequence-runner) */
- const types = ['while']
- function parse(action, parseContext) {
- const { parseActions } = parseContext
- const parsed = {
- type: 'while',
- condition: action.condition,
- body: (action.body || action.ture) ? parseActions(action.body || action.ture) : [],
- }
- return Object.assign({}, action, parsed)
- }
- async function execute() {
- return { success: true }
- }
- module.exports = { types, parse, execute }
|