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

13
LINES

< > BotCompany Repo | #1011445 - tok_combineCurlyBrackets_keep

JavaX fragment (include)

static L<S> tok_combineCurlyBrackets_keep(L<S> tok) {
  new L<S> l;
  for i over tok: {
    S t = tok.get(i);
    if (odd(i) && eq(t, "{")) {
      int j = findEndOfCurlyBracketPart(tok, i);
      l.add(joinSubList(tok, i, j));
      i = j-1;
    } else
      l.add(t);
  }
  ret l;
}

Author comment

Began life as a copy of #1011439

download  show line numbers  debug dex   

Travelled to 9 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1011445
Snippet name: tok_combineCurlyBrackets_keep
Eternal ID of this version: #1011445/2
Text MD5: 2b75516cf6c2c0a80cec66be483e44b6
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-09 06:42:40
Source code size: 296 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 281 / 248
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1011445 & http://1011445.tinybrain.de