pike.git / lib / modules / Tools.pmod / AutoDoc.pmod / PikeParser.pike

version» Context lines:

pike.git/lib/modules/Tools.pmod/AutoDoc.pmod/PikeParser.pike:668:    eat("...");    }    if (isIdent(peekToken()))    identifier = readToken();    }       if (typ && (identifier || !allowLiterals || (typ->name != "object"))) {    // Note: identifier may be zero for unnamed arguments in prototypes.    argnames += ({ identifier });    argtypes += ({ typ }); +  +  if (peekToken() == "=") { +  // FIXME: Consider documenting the default value in the +  // trivial case (ie literal constant). +  eat("="); +  skipUntil((< ",", ")", ";", EOF >)); +  +  // Adjust the type to be '|void'. +  if (argtypes[-1]->types) { +  // Or-type. +  argtypes[-1]->types += ({ VoidType() }); +  } else { +  typ = OrType(); +  typ->types = ({ argtypes[-1], VoidType() }); +  argtypes[-1] = typ;    } -  +  } +  }    else {    if (typ) {    // it's an identifier 'Foo.Bar.gazonk' designating a constant that    // has been mistaken for an object type ...    literal = typ->classname;    }    argnames += ({ literal });    argtypes += ({ 0 });    }    if (peekToken() == ")")