Skip to content
Snippets Groups Projects
Commit 947bec4a authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Autodoc: The set of modifiers for a symbol is now on a more canonic form.

parent b446afb2
Branches
Tags
No related merge requests found
...@@ -660,10 +660,28 @@ array(string) parseModifiers() { ...@@ -660,10 +660,28 @@ array(string) parseModifiers() {
string s = peekToken(); string s = peekToken();
array(string) mods = ({ }); array(string) mods = ({ });
while (modifiers[s]) { while (modifiers[s]) {
// Canonicalize some aliases.
s = ([ "nomask":"final",
"static":"protected",
"inline":"local",
])[s] || s;
if (!has_value(mods, s)) {
mods += ({ s }); mods += ({ s });
}
readToken(); readToken();
s = peekToken(); s = peekToken();
} }
if (sizeof(mods) > 1) {
// Clean up implied modifiers.
if (has_value(mods, "private")) {
// private implies protected.
mods -= ({ "protected", });
}
if (has_value(mods, "final")) {
// final implies local.
mods -= ({ "local" });
}
}
return mods; return mods;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment