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

12
LINES

< > BotCompany Repo | #1017492 // ai_scanParseTreeForWord_all

JavaX fragment (include)

static L<PTElement> ai_scanParseTreeForWord_all(PTElement e, S word) {
  new L<PTElement> out;
  ai_scanParseTreeForWord_all_scan(e, word, out);
  ret out;
}

svoid ai_scanParseTreeForWord_all_scan(PTElement e, S word, L<PTElement> out) {
  if (e == null) ret;
  if (eqic(e.text(), word)) ret with out.add(e);
  for (PTElement child : unnull(e.children))
    ai_scanParseTreeForWord_all_scan(child, word, out);
}

Author comment

Began life as a copy of #1017491

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: #1017492
Snippet name: ai_scanParseTreeForWord_all
Eternal ID of this version: #1017492/4
Text MD5: 71e5cbee5085bd0c227cf9d0a78387da
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-23 22:53:57
Source code size: 423 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 255 / 291
Version history: 3 change(s)
Referenced in: [show references]