( js: CombinatorCompiler, node: BaseNode )
| 1150 | |
| 1151 | /** a node's checker, if it combines */ |
| 1152 | export const writeCombinator = ( |
| 1153 | js: CombinatorCompiler, |
| 1154 | node: BaseNode |
| 1155 | ): string | undefined => { |
| 1156 | if (!combines(node)) return |
| 1157 | const said = saidByNode.get(node) |
| 1158 | if (said) { |
| 1159 | // what it is without its message is written in place where small, and |
| 1160 | // is otherwise the unit every root that is one reads, as each field |
| 1161 | // checking a UUID reads one RegExp |
| 1162 | reachRootsOf(js, said.plain) |
| 1163 | return writeCall( |
| 1164 | "saying", |
| 1165 | readChecker(js, said.plain), |
| 1166 | JSON.stringify(said.message) |
| 1167 | ) |
| 1168 | } |
| 1169 | if (node.checksCtx) return writeCall("readingCtx", writeChecker(js, node)) |
| 1170 | return writeChecker(js, node) |
| 1171 | } |
| 1172 | |
| 1173 | const writeChecker = ( |
| 1174 | js: CombinatorCompiler, |
no test coverage detected