1 | static O quickEval(S t) { |
2 | if (isQuoted(t)) ret unquote(t); |
3 | if (isInteger(t)) ret parseIntOrLong(t); |
4 | if (isLongConstant(t)) ret parseLong(t); |
5 | if (eq(t, "null")) ret null; |
6 | if (eq(t, "false")) ret false; |
7 | if (eq(t, "true")) ret true; |
8 | if (isIdentifier(t)) ret getMC(t); |
9 | if (isSnippetID(t)) ret t; |
10 | throw quickFail("Can't quick eval: " + t); |
11 | } |
Began life as a copy of #1015634
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: | #1015635 |
Snippet name: | quickEval - anything that can be evaluated without side effects |
Eternal ID of this version: | #1015635/6 |
Text MD5: | 4fb133bda47b6cadcaefa6136ff0ae5e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-05 20:08:51 |
Source code size: | 364 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 468 / 528 |
Version history: | 5 change(s) |
Referenced in: | [show references] |