Transpiled version (3096L) is out of date.
1 | // e.g. hasWord($x) => bla |
2 | // to: for $x where hasWord($x): bla |
3 | |
4 | sO ai_lhsToForWhere(BasicLogicRule rule, DeepZipTools tools) { |
5 | ret ai_lhsToForWhere(rule, null, tools); |
6 | } |
7 | |
8 | sO ai_lhsToForWhere(BasicLogicRule rule, Set knownVars, DeepZipTools tools) { |
9 | rule = (BasicLogicRule) ai_fragmentExpressionsToFunctionCalls(rule, tools); |
10 | if (!(rule.lhs instanceof FunctionCall)) ret rule; |
11 | FunctionCall fc = (FunctionCall) rule.lhs; |
12 | if (l(fc.args) != 1) ret rule; |
13 | O var = first(fc.args); |
14 | if (!tools.isVar(var) || contains(knownVars, var)) ret rule; |
15 | ret ForWhere(var, rule.lhs, rule.rhs); |
16 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027895 |
Snippet name: | ai_lhsToForWhere |
Eternal ID of this version: | #1027895/4 |
Text MD5: | 7f95287881ba36928e84dbe85871e859 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-16 16:12:37 |
Source code size: | 608 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 210 / 312 |
Version history: | 3 change(s) |
Referenced in: | [show references] |