compileCommandTupleInNamespace 编译带命名空间的子事件指令函数元组
compileCommandTupleInNamespace
类型: MethodDeclaration
所属类: CommandFunctionList
定义位置: command.ts
描述
编译带命名空间的子事件指令函数元组
参数 commands
: 指令函数列表
返回值:两个指令函数
参数
参数名 | 类型 | 描述 | 默认值 |
---|---|---|---|
commands | CommandFunctionList | - | - |
返回值
类型: \[CommandFunction, CommandFunction\]
两个指令函数
源代码
位置: 第 3534 行
private compileCommandTupleInNamespace(commands: CommandFunctionList): [CommandFunction, CommandFunction] {
const attrMapKey = Symbol('ATTRIBUTES_BACKUP')
const fn1 = () => {
(CurrentEvent as any)[attrMapKey] = CurrentEvent.attributes
CurrentEvent.attributes = {}
CurrentEvent.stack.push(CommandList, CommandIndex)
CommandList = commands
CommandIndex = 0
return true
}
const fn2 = () => {
CurrentEvent.attributes = (CurrentEvent as any)[attrMapKey]
return true
}
return [fn1, fn2]
}
文档生成时间:2025/7/7 12:07:06