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

10
LINES

< > BotCompany Repo | #1019355 // groupIndentedDictionary

JavaX fragment (include)

1  
static SS groupIndentedDictionary(LS l) {
2  
  SS map = ciMap();
3  
  for (int i = 0; i+1 < l(l); i++)
4  
    if (!startsWithSpace(l.get(i)) && startsWithSpace(l.get(i+1))) {
5  
      map.put(trim(l.get(i)), autoUnindent(l.get(i+1)));
6  
      ++i;
7  
    } else
8  
      warn("groupIndentedDictionary: bad entry at " + i);
9  
  ret map;
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019355
Snippet name: groupIndentedDictionary
Eternal ID of this version: #1019355/2
Text MD5: b139cc9035887e851f1dc997db9d3d28
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-04 14:19:26
Source code size: 324 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 268 / 303
Version history: 1 change(s)
Referenced in: [show references]