svoid tok_processMetaBlocks(LS tok, bool metaCodeAllowed) { for (int i = 0; i < 1000; i++) { int idx = findCodeTokens(tok, "meta", "{"); if (idx < 0) break; if (!metaCodeAllowed) fail("Meta code not allowed"); int j = findEndOfBracketPart(tok, idx+2); S code = joinSubList(tok, idx+4, j-2); print("Evaluating: " + code); S result = str(javaEval(code)); replaceTokens_reTok(tok, idx, j+1, result); } }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025380 |
| Snippet name: | tok_processMetaBlocks |
| Eternal ID of this version: | #1025380/1 |
| Text MD5: | 5b36008d4354c4217b66445b7d82f131 |
| Author: | stefan |
| Category: | javax / transpiling |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-09-27 00:53:02 |
| Source code size: | 447 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 465 / 506 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |