Download Jar. Libraryless. Click here for Pure Java version (7952L/58K).
1 | !7 |
2 | |
3 | p-exp { |
4 | S code = [[formatDouble(parseDouble($x) + parseDouble($y), 2)]]; |
5 | L<S> tok = javaTok(code); |
6 | new LinkedHashSet<S> vars; |
7 | for (int i = 1; i < l(tok); i += 2) { |
8 | S t = tok.get(i); |
9 | if (isDollarVar(t)) |
10 | vars.add(t); |
11 | } |
12 | temp tempSetThreadLocal(evalJava_prep_args, joinWithComma(map(func(S var) -> S { "S " + var }, vars))); |
13 | S src = evalJava_prep(code); |
14 | printIndent(src); |
15 | O c = evalJava_prep2(src); |
16 | assertEqualsVerbose("3.8", call(c, 'calc, "1.5", "2.3")); |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017773 |
Snippet name: | Eval with dollar vars Spike [OK, -> evalWithDollarVars] |
Eternal ID of this version: | #1017773/5 |
Text MD5: | b3bc3a18b4d4f751031851c659d3b5a9 |
Transpilation MD5: | 51178fc1c113d6afbd3c1aab6a6ca08b |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-10 22:05:23 |
Source code size: | 508 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 435 / 983 |
Version history: | 4 change(s) |
Referenced in: | [show references] |