Libraryless. Click here for Pure Java version (8424L/67K).
1 | sS make_dm_require_function(S moduleSnippetID, S functionName) { |
2 | moduleSnippetID = fsI(moduleSnippetID); |
3 | S className = tok_moduleNameFromJavaXSource(loadSnippet(moduleSnippetID)); |
4 | if (empty(className)) fail("Can't derive module name for " + moduleSnippetID); |
5 | |
6 | S src = "sS " + functionName + "() {\n" + |
7 | " ret dm_require(" + quote(moduleSnippetID + "/" + className) + ");\n" + |
8 | "}"; |
9 | |
10 | printIndent(src); |
11 | S newSnippetID = createSnippet(src, functionName, snippetType_JavaXInclude()); |
12 | checkMarkAnimation_bottomLeft(addStdFunction(newSnippetID, true), 2); |
13 | stdFunctions_clearCache(); |
14 | ret "Require function made: " + newSnippetID; |
15 | } |
Began life as a copy of #1015574
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1023399 |
Snippet name: | make_dm_require_function |
Eternal ID of this version: | #1023399/3 |
Text MD5: | 36b51e6d384b6265f853ec42a011c2cb |
Transpilation MD5: | 1a6e70cee9ebf7f936d9cf95190368d6 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-06-17 20:09:58 |
Source code size: | 665 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 263 / 368 |
Version history: | 2 change(s) |
Referenced in: | [show references] |