Libraryless. Click here for Pure Java version (4281L/29K).
1 | !759 |
2 | |
3 | p { |
4 | String s = loadMainJava(); |
5 | |
6 | // process include statements |
7 | |
8 | for (int n = 0; n < 1000; n++) { |
9 | Matcher m = Pattern.compile("!include (#\\d+)").matcher(s); |
10 | StringBuffer buf = new StringBuffer(); |
11 | if (!m.find()) |
12 | break; |
13 | else do { |
14 | String includedSrc = loadSnippet(m.group(1)); |
15 | m.appendReplacement(buf, m.quoteReplacement(includedSrc)); |
16 | } while (m.find()); |
17 | m.appendTail(buf); |
18 | s = buf.toString(); |
19 | } |
20 | |
21 | saveMainJava(s); |
22 | } |
Began life as a copy of #636
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007957 |
Snippet name: | Simple Include-Handling Translator (for !7, not used anymore) |
Eternal ID of this version: | #1007957/4 |
Text MD5: | 9acd29442fcd1e3361ee581fc87b57f3 |
Transpilation MD5: | 51f321f0221992e7977ab2f8905e7be8 |
Author: | stefan |
Category: | javax |
Type: | JavaX translator |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-20 14:06:21 |
Source code size: | 502 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 486 / 1982 |
Version history: | 3 change(s) |
Referenced in: | [show references] |