(n, ctx)
| 169 | } |
| 170 | |
| 171 | static ConvertConditionalExpression (n, ctx) { |
| 172 | const found = findOne(ctx.plan, x => fuzzyMatch(n, x[1]), 'Can\'t find the ternary expression') |
| 173 | const yes = convert(n.consequent, { ...ctx, nospace: true, context: 'value' }) |
| 174 | const no = convert(n.alternate, { ...ctx, nospace: true, context: 'value' }) |
| 175 | |
| 176 | const o = { |
| 177 | type: found[0].type, |
| 178 | inputs: { |
| 179 | IF: { block: convert(n.test, ctx) }, |
| 180 | }, |
| 181 | } |
| 182 | |
| 183 | if (yes) o.inputs.THEN = { block: yes } |
| 184 | if (no) o.inputs.ELSE = { block: no } |
| 185 | |
| 186 | return o |
| 187 | } |
| 188 | |
| 189 | static ConvertEmptyStatement (n, ctx) { |
| 190 | return null |
nothing calls this directly
no test coverage detected