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

13
LINES

< > BotCompany Repo | #1025593 - tok_combineRoundBrackets_keep

JavaX fragment (include)

static LS tok_combineRoundBrackets_keep(L<S> tok) {
  new L<S> l;
  for i over tok: {
    S t = tok.get(i);
    if (odd(i) && eq(t, "(")) {
      int j = findEndOfBracketPart(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 #1011445

download  show line numbers  debug dex   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1025593
Snippet name: tok_combineRoundBrackets_keep
Eternal ID of this version: #1025593/3
Text MD5: eb2d32295015ea08b100df9d5b41d4ba
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-10-05 22:47:51
Source code size: 289 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 3 / 11
Version history: 2 change(s)
Referenced in: [show references]