(mode, state)
| 2279 | // Given a mode and a state (for that mode), find the inner mode and |
| 2280 | // state at the position that the state refers to. |
| 2281 | function innerMode(mode, state) { |
| 2282 | var info |
| 2283 | while (mode.innerMode) { |
| 2284 | info = mode.innerMode(state) |
| 2285 | if (!info || info.mode == mode) { |
| 2286 | break |
| 2287 | } |
| 2288 | state = info.state |
| 2289 | mode = info.mode |
| 2290 | } |
| 2291 | return info || { mode: mode, state: state } |
| 2292 | } |
| 2293 | |
| 2294 | function startState(mode, a1, a2) { |
| 2295 | return mode.startState ? mode.startState(a1, a2) : true |
no outgoing calls
no test coverage detected