1 | static bool tok_hasClassRef2(L<S> tok, S className) {
|
2 | int n = l(tok); |
3 | int level = 0; |
4 | for (int i = 1; i < n; i += 2) {
|
5 | S t = tok.get(i); |
6 | if (eqOneOf(t, "ifclass", "ifndef")) ++level; |
7 | else if (eqOneOf(t, "endif", "endifndef")) --level; |
8 | else if (level <= 0 && eq(t, className)) true; |
9 | } |
10 | false; |
11 | } |
Began life as a copy of #1007936
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: | #1009545 |
| Snippet name: | tok_hasClassRef2 - leaves out ifclass blocks |
| Eternal ID of this version: | #1009545/1 |
| Text MD5: | fa16af32503c9a171bba5a0bef28417b |
| Author: | stefan |
| Category: | javax / parsing |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-08-07 17:42:41 |
| Source code size: | 327 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 817 / 821 |
| Referenced in: | [show references] |