1 | static bool getHtmlTagParameters_debug; |
2 | |
3 | static SS getHtmlTagParameters(S tag) { |
4 | if (empty(tag)) null; |
5 | L<S> tok = codeTokens(tok_joinMinusIdentifiers(htmlFineTok(tag))); |
6 | if (getHtmlTagParameters_debug) |
7 | printStruct(tok); |
8 | assertEquals("<", tok.get(0)); |
9 | int i = 1; |
10 | if (eq(tok.get(1), "/")) ++i; |
11 | S name = tok.get(i++); |
12 | if (!isMinusIdentifier(name)) |
13 | fail(tag + " (" + name + ")"); |
14 | new SS map; |
15 | while (i < l(tok)) { |
16 | S t = tok.get(i); |
17 | if (eqOneOf(t, "/", ">")) break; |
18 | if (!isMinusIdentifier(t)) |
19 | fail(tag + " (" + t + ")"); |
20 | ++i; |
21 | S value = "1"; |
22 | if (eq(tok.get(i), "=")) { |
23 | ++i; |
24 | value = htmlunquote(tok.get(i++)); |
25 | } |
26 | map.put(t, value); |
27 | } |
28 | ret map; |
29 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005220 |
Snippet name: | getHtmlTagParameters - TODO: fix |
Eternal ID of this version: | #1005220/11 |
Text MD5: | cf02a969362cf227aece1ca35d2f278f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-23 00:07:00 |
Source code size: | 745 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 663 / 640 |
Version history: | 10 change(s) |
Referenced in: | [show references] |