chickadee » svnwiki-sxml » svnwiki-signature->identifier

svnwiki-signature->identifier sig typeprocedure

Conventional parser for definition signatures as written in Chicken svnwiki documents. Converts a signature string (usually a list or bare identifier) into an identifier. Returns a symbol, a string, or #f.

Operation. We read the string with the scheme reader. If a list, take the car recursively. If a symbol, return the symbol. If any other scheme object, return the whole signature string. If it cannot be read as a scheme expression, return #f. As a special case, read syntax (type read) returns the entire signature without trying to read it first; note this may cause a problem with older Chicken versions due to read/write variance on symbols starting with #. Also note that results of parsing a keyword identifier are, at this time, undefined.