(n, ctx)
| 554 | } |
| 555 | |
| 556 | static ConvertMemberExpression (n, ctx) { |
| 557 | if (n.computed === true) { |
| 558 | return { |
| 559 | type: 'lists_getIndex', |
| 560 | fields: { |
| 561 | MODE: 'GET', |
| 562 | WHERE: 'FROM_START', |
| 563 | }, |
| 564 | inputs: { |
| 565 | AT: { block: convert(n.property, ctx) }, |
| 566 | VALUE: { block: convert(n.object, ctx) }, |
| 567 | }, |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | if (n.property.type === 'Identifier' && n.property.name === 'length') { |
| 572 | return { |
| 573 | type: 'lists_length', |
| 574 | inputs: { |
| 575 | VALUE: { block: convert(n.object, ctx) }, |
| 576 | }, |
| 577 | } |
| 578 | } |
| 579 | |
| 580 | const found = findOne(ctx.plan, x => fuzzyMatch(n, x[1]), `Couldn't find match for ${JSON.stringify(n)}`) |
| 581 | // console.log(found) |
| 582 | return { |
| 583 | type: found[0].type, |
| 584 | } |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | function convert (node, ctx) { |
nothing calls this directly
no test coverage detected