Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1000373 // JavaX multi-line-strings (JavaX translator, fixed)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Compilation Failed (493L/4K).

!636
!standard functions
!quicknew
!class JavaTok

// A JavaX extension for multi-line strings, modelled after Lua [[ ]] quotes. Improved version using JavaTok.

public class main {
  public static void main(String[] args) throws Exception {
    String s = loadMainJava();
    
    List<String> tok = JavaTok.split(s);
    
    for (int i = 1; i < tok.size(); i += 2)
      if (tok.get(i).startsWith("[["))
        tok.set(i, quote(unquote(tok.get(i))));
    
    s = JavaTok.join(tok);
    saveMainJava(s);
  }
}

Author comment

Began life as a copy of #605

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

Comments [hide]

ID Author/Program Comment Date
985 #1000604 (pitcher) 2015-08-20 15:28:24
984 #1000610 (pitcher) 2015-08-18 00:07:07

add comment

Snippet ID: #1000373
Snippet name: JavaX multi-line-strings (JavaX translator, fixed)
Eternal ID of this version: #1000373/1
Text MD5: ff9ee144df34e72a4bcc01337a2c7060
Transpilation MD5: e2adeccc734eeb68db8fb9620b73ebf8
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-07-30 23:01:25
Source code size: 533 bytes / 21 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 924 / 968
Referenced in: [show references]