Scope (connection phases)
Scope tracks which **business phase** the connection is in (`auth`, a room, etc.). Enter with `~name`, exit with `!~name`; affects which `--` lines match and whether `--@loop` timers run.
读法:enter 根 runBranch 结束后 push 帧并移入匹配上下文。缩进在 返回行 下的 -- → 下帧生效;与 entry 平级 的子 -- → 同帧 scan(§5.2)。
Normative 定义见第十七节。 本节为阅读摘要:
- scopeStack + 隐式 root 帧;
--login ~authpush;--logout !~authpop(含子孙) --@loop绑 scope 帧;pop → cancel timers- 普通
--仅在栈顶帧匹配上下文子树内选取 entry;!~name全 Flow 扫描但 须栈上已有 name 且 优先于 entry - entry 命中 → enter 根 runBranch:平级子节点顺序 scan(§5.2);递归子
--用 scan 模式,不 push 中间帧 - 多个 互斥 entry(同级不同
--根分支)仍为 OR,源序深度优先择一