1 | static O callAndMake_extended(S code, fO... args) {
|
2 | if (code == null) null; |
3 | code = trim(code); |
4 | if (isQuoted(code)) ret unquote(code); |
5 | if (isInteger(code)) ret parseInt(code); |
6 | if (isIdentifier(code)) |
7 | ret eq(code, "x") ? first(args) : callAndMake(code, args); |
8 | L<S> tok = javaTok(code); |
9 | if (lCodeTokens(tok) == 4 && eq(second(tok), "f") && isIdentifier(get(tok, 3)) && eq("/", get(tok, 5)))
|
10 | if (eq("1", get(tok, 7)))
|
11 | ret standardFunctionReference_1(get(tok, 3)); |
12 | else if (eq("2", get(tok, 7)))
|
13 | ret standardFunctionReference_2(get(tok, 3)); |
14 | Pair<S, L<S>> p = tok_parseFunctionCall(tok); |
15 | if (p == null) fail("Can't parse: " + code);
|
16 | ret callAndMake(p.a, map_toArray(func(S arg) -> O { callAndMake_extended(arg, args) }, p.b));
|
17 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1014328 |
| Snippet name: | callAndMake_extended - also accepts function calls on x |
| Eternal ID of this version: | #1014328/6 |
| Text MD5: | 70bb2c61bb9de82ee1cf5e9cf54fa6fa |
| Author: | stefan |
| Category: | javax / parsing |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-04-20 04:07:08 |
| Source code size: | 783 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 537 / 598 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |