Branch: Tag:

2012-02-05

2012-02-05 21:26:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Tools.AutoDoc: Added syntax and markup for documenting cpp directives.

61:    "namespace" : METAKEYWORD,    "endnamespace" : METAKEYWORD,    "decl" : METAKEYWORD, +  "directive" : METAKEYWORD,    "inherit" : METAKEYWORD,    "enum" : METAKEYWORD,    "endenum" : METAKEYWORD,
966:    }    break;    +  case "directive": +  { +  if (endkeyword) +  parseError("@%s must stand alone", endkeyword); +  int first = !meta->type; +  if (!meta->type) +  meta->type = "decl"; +  else if (meta->type != "decl") +  parseError("@directive can not be combined with @%s", meta->type); +  if (meta->appears) +  parseError("@appears before @directive"); +  if (meta->belongs) +  parseError("@belongs before @directive"); +  meta->type = "decl"; +  string s = String.trim_all_whites(arg); +  meta->decls += ({ .PikeObjects.CppDirective(s) }); +  } +  break; +     case "appears":    {    if (endkeyword)