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

13
LINES

< > BotCompany Repo | #1026465 // tok_combineRoundOrCurlyBrackets_keep_strict

JavaX fragment (include)

static L<S> tok_combineRoundOrCurlyBrackets_keep_strict(L<S> tok) {
  new L<S> l;
  for i over tok: {
    S t = tok.get(i);
    if (odd(i) && eqOneOf(t, "{", "(")) {
      int j = findEndOfBracketPart_strict(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 #1013160

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026465
Snippet name: tok_combineRoundOrCurlyBrackets_keep_strict
Eternal ID of this version: #1026465/1
Text MD5: d7266f6b85b214042f91d2fde5db8a0c
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-05 01:34:31
Source code size: 322 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 176 / 207
Referenced in: [show references]