Branch: Tag:

2004-11-26

2004-11-26 14:16:18 by Martin Nilsson <mani@lysator.liu.se>

We can always get more syntax.

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

469:    args += ({ s });    }    else { -  int start = i; -  while (arg[i] && !isSpaceChar(arg[i])) +  String.Buffer out = String.Buffer(); +  int quote = 0; +  while (arg[i] && (!isSpaceChar(arg[i]) || quote) ) { +  if(arg[i]=='@') { +  switch(arg[i+1]) { +  case '@': +  out->putchar( '@' ); +  break; +  case '{': +  quote++; +  break; +  case '}': +  quote--; +  if(quote<0) +  parseError(sprintf("@%s with too many @}.\n", keyword)); +  break; +  case 0: +  default: +  parseError("Illegal @ statement.\n"); +  } +  } +  else +  out->putchar(arg[i]);    ++i; -  args += ({ arg[start .. i - 1] }); +     } -  +  args += ({ (string)out });    } -  +  }       mapping(string:string) res = ([]);