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

14
LINES

< > BotCompany Repo | #1017741 // ai_scanParseTreeForCategory

JavaX fragment (include)

static L<PTElement> ai_scanParseTreeForCategory(PTElement e, S category) {
  new L<PTElement> out;
  ai_scanParseTreeForCategory_scan(e, category, out);
  ret out;
}

svoid ai_scanParseTreeForCategory_scan(PTElement e, S category, L<PTElement> out) {
  if (e == null) ret;
  if (e cast HaveCategory)
    if (eq(e.category, category))
      out.add(e);
  for (PTElement child : unnull(e.children))
    ai_scanParseTreeForCategory_scan(child, category, out);
}

Author comment

Began life as a copy of #1017492

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017741
Snippet name: ai_scanParseTreeForCategory
Eternal ID of this version: #1017741/1
Text MD5: 92a02cf95cebb0d7b1a2f526e5989570
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-07 20:29:35
Source code size: 471 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 319 / 358
Referenced in: [show references]