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

11
LINES

< > BotCompany Repo | #1008943 // jmatch2 - with full functionality of jfind (<quoted> etc.)

JavaX fragment (include)

static bool jmatch2(S pat, L<S> tok) {
  List<String> tokpat = javaTok(pat);
  jfind_preprocess(tokpat);
  ret jmatch2(tokpat, tok);
}

// assumes you preprocessed tokpat
static bool jmatch2(L<S> tokpat, L<S> tok) {
  if (l(tok) != l(tokpat)) false;
  ret findCodeTokens(tok, 1, false, toStringArray(codeTokensOnly(tokpat)), null) == 1; // TODO: optimize
}

Author comment

Began life as a copy of #1002429

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008943
Snippet name: jmatch2 - with full functionality of jfind (<quoted> etc.)
Eternal ID of this version: #1008943/6
Text MD5: 682550820e7bf66eb2c48e11c4e4e4d8
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-20 00:25:49
Source code size: 366 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 577 / 599
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1008945 - jmatch2_debug