chickadee » chicken » syntax » read-with-source-info

(read-with-source-info [port filename])procedure

Exactly like read from the scheme module, except it registers the expression it read into the line number database, so that if (read-with-source-info) returns OBJ, (get-line-number OBJ) will return the line number in port.

The port argument may be omitted, in which case it defaults to the value returned by current-input-port. It is an error to read from a closed port. If filename is given, it designates the name of the file associated. In case this argument is not given, the currently opened source file is used. If no current source file is opened, then the name defaults to "<stdin>".