(n, ctx)
| 526 | } |
| 527 | |
| 528 | static ConvertIdentifier (n, ctx) { |
| 529 | let out |
| 530 | if (n.name in ctx.scope && ctx.scope[n.name].type === 'var') { |
| 531 | out = { |
| 532 | type: 'variables_get', |
| 533 | fields: { VAR: { id: n.name } }, |
| 534 | } |
| 535 | } else { |
| 536 | const found = findOne(ctx.plan, x => fuzzyMatch(n, x[1]), `Unknown variable ${n.name}`) |
| 537 | out = { |
| 538 | type: found[0].type, |
| 539 | } |
| 540 | } |
| 541 | if (ctx.context === 'statement') { |
| 542 | return { |
| 543 | type: 'expression_statement', |
| 544 | inputs: { |
| 545 | EXPRESSION: { block: out }, |
| 546 | }, |
| 547 | } |
| 548 | } |
| 549 | return out |
| 550 | } |
| 551 | |
| 552 | static ConvertUnaryExpression (n, ctx) { |
| 553 | return null |
nothing calls this directly
no test coverage detected