diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-04-07 07:14:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-04-07 07:14:18 -0700 |
commit | e16a723bb22365da26412f547730c475cc122525 (patch) | |
tree | 65bde07f21d17a047c8c197766806b0b2899a6b1 /txr.1 | |
parent | cb4ad08e75bef0877da2a755d5b2b15a099ad8ce (diff) | |
download | txr-e16a723bb22365da26412f547730c475cc122525.tar.gz txr-e16a723bb22365da26412f547730c475cc122525.tar.bz2 txr-e16a723bb22365da26412f547730c475cc122525.zip |
doc: read, iread: document lineno parameter.
* txr.1: The read and iread functions have an optional
parameter for overriding the starting line number. It is now
documented. read and lisp-parse got this parameter in 2015,
in TXR 123. iread was introduced with this parameter in
TXR 124.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -50679,8 +50679,10 @@ function. .coNP Functions @ read and @ iread .synb -.mets (read >> [ source >> [ error-stream >> [ error-retval <> [ name ]]]]) -.mets (iread >> [ source >> [ error-stream >> [ error-retval <> [ name ]]]]) +.mets (read >> [ source +.mets \ \ \ \ \ \ >> [ err-stream >> [ err-retval >> [ name <> [ lineno ]]]]]) +.mets (iread >> [ source +.mets \ \ \ \ \ \ \ >> [ err-stream >> [ err-retval >> [ name <> [ lineno ]]]]]) .syne .desc The @@ -50700,7 +50702,7 @@ from the stream. To parse successive objects from a string, it is necessary to convert it to a string stream. The optional -.meta error-stream +.meta err-stream argument can be used to specify a stream to which parse errors diagnostics are sent. If absent, the diagnostics are suppressed. @@ -50716,12 +50718,19 @@ is used as the name if .meta source is a string. +The optional +.code lineno +argument, defaulting to 1, specifies the starting line number. This, +like the +.meta name +argument, is used for reporting errors. + If there are no parse errors, the function returns the parsed data structure. If there are parse errors, and the -.meta error-retval +.meta err-retval parameter is present, its value is returned. If the -.meta error-retval +.meta err-retval parameter is not present, then an exception of type .code syntax-error |