static bool getHtmlTagParameters_debug;
static SS getHtmlTagParameters(S tag) {
if (empty(tag)) null;
L tok = codeTokens(tok_joinMinusIdentifiers(htmlFineTok(tag)));
if (getHtmlTagParameters_debug)
printStruct(tok);
assertEquals("<", tok.get(0));
int i = 1;
if (eq(tok.get(1), "/")) ++i;
S name = tok.get(i++);
if (!isMinusIdentifier(name))
fail(tag + " (" + name + ")");
new SS map;
while (i < l(tok)) {
S t = tok.get(i);
if (eqOneOf(t, "/", ">")) break;
if (!isMinusIdentifier(t))
fail(tag + " (" + t + ")");
++i;
S value = "1";
if (eq(tok.get(i), "=")) {
++i;
value = htmlunquote(tok.get(i++));
}
map.put(t, value);
}
ret map;
}