AND AND / OR OR is equivalent to one operator; collapse before compile / IPC.
(arr)
| 211 | |
| 212 | /** AND AND / OR OR is equivalent to one operator; collapse before compile / IPC. */ |
| 213 | function collapseAdjacentDuplicateBinaryOps(arr) { |
| 214 | for (let i = 1; i < arr.length; i++) { |
| 215 | const a = arr[i - 1]; |
| 216 | const b = arr[i]; |
| 217 | if (a.t === "op" && b.t === "op" && a.op === b.op) { |
| 218 | arr.splice(i, 1); |
| 219 | i--; |
| 220 | } |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | function normalizeTokensForIpc(tokens) { |
| 225 | const out = tokens.filter((tok) => { |
no outgoing calls
no test coverage detected