Branch: Tag:

2001-07-16

2001-07-16 11:41:10 by David Norlin <norlin@roxen.com>

Tell the user which keywords are allowed as children.

Rev: lib/modules/Tools.pmod/AutoDoc.pmod/DocParser.pmod:1.37

633:    string keyword = token->keyword;    single = single || (token->type == SINGLEKEYWORD && keyword);    multiset(string) allow = allowedChildren[container]; -  if (!allow || !allow[keyword]) -  parseError("@" + keyword + " is not allowed inside @" + container); +  if (!allow || !allow[keyword]) { +  string e = sprintf("@%s is not allowed inside @%s", +  keyword, container); +  if (allow) +  e += sprintf(" (allowed children are:%{ @%s%})", indices(allow)); +  else +  e += " (no children are allowed)"; +  parseError(e); +  }       multiset(string) allowGroup = allowGrouping[keyword] || ([]);    foreach (keywords, string k)