1 | // debug "bla" + blubb; => { if (debug) print("bla" + blubb); } |
2 | svoid tok_debugStatements(LS tok) { |
3 | int i = -1; |
4 | while ((i = jfind(tok, i+1, "debug <quoted>")) >= 0) { |
5 | int j = tok_findEndOfStatement(tok, i); // index of semicolon+1 |
6 | replaceTokens(tok, i, i+2, "{ if (debug) print("); |
7 | tok.set(j-1, "); }"); |
8 | i = j; |
9 | } |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022730 |
Snippet name: | tok_debugStatements |
Eternal ID of this version: | #1022730/3 |
Text MD5: | bb7304c965986b4026a547efbd1362d1 |
Author: | stefan |
Category: | javax / transpiling |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-03 16:00:00 |
Source code size: | 347 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 250 / 296 |
Version history: | 2 change(s) |
Referenced in: | [show references] |