From e16a723bb22365da26412f547730c475cc122525 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 7 Apr 2020 07:14:18 -0700 Subject: 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. --- txr.1 | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/txr.1 b/txr.1 index 5295e105..51d6b995 100644 --- a/txr.1 +++ b/txr.1 @@ -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 -- cgit v1.2.3