Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9abe64a

Browse files
committed
(libparser.tex): Added note that the line number for a terminal token
indicates the line on which the token ends rather than starts (a side effect of interpreting the parse tree nodes directly). Maybe I'll fix this for Python 2.0.
1 parent ba469ba commit 9abe64a

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Doc/lib/libparser.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ \subsection{Converting AST Objects}
166166

167167
If \code{\var{line_info}} is true, line number information will be
168168
included for all terminal tokens as a third element of the list
169-
representing the token. This information is omitted if the flag is
170-
false or omitted.
169+
representing the token. Note that the line number provided specifies
170+
the line on which the token \emph{ends\/}. This information is
171+
omitted if the flag is false or omitted.
171172
\end{funcdesc}
172173

173174
\begin{funcdesc}{ast2tuple}{ast\optional{\, line_info\code{ = 0}}}

Doc/libparser.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ \subsection{Converting AST Objects}
166166

167167
If \code{\var{line_info}} is true, line number information will be
168168
included for all terminal tokens as a third element of the list
169-
representing the token. This information is omitted if the flag is
170-
false or omitted.
169+
representing the token. Note that the line number provided specifies
170+
the line on which the token \emph{ends\/}. This information is
171+
omitted if the flag is false or omitted.
171172
\end{funcdesc}
172173

173174
\begin{funcdesc}{ast2tuple}{ast\optional{\, line_info\code{ = 0}}}

0 commit comments

Comments
 (0)