1 | static int matchMetaNoStar(L<S> tok, S... tokens) {
|
2 | outer: for (int i = 1; i+l(tokens)*2-2 < l(tok); i += 2) {
|
3 | for (int j = 0; j < l(tokens); j++) {
|
4 | S p = tokens[j]; |
5 | S t = tok.get(i+j*2); |
6 | boolean ok; |
7 | if (eq(p, "<number>")) |
8 | ok = isInteger(t); |
9 | else |
10 | ok = eq(p, t); |
11 | if (!ok) |
12 | continue outer; |
13 | } |
14 | return i; |
15 | } |
16 | return -1; |
17 | } |
Began life as a copy of #1001944
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: | #1001963 |
| Snippet name: | matchMetaNoStar |
| Eternal ID of this version: | #1001963/1 |
| Text MD5: | d967fa8c4db6b4ac14438054c821064e |
| Author: | stefan |
| Category: | |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-12-09 23:01:56 |
| Source code size: | 407 bytes / 17 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 960 / 1209 |
| Referenced in: | [show references] |