changeset 32962:476a7ecc1f4c stable

doc: Add keyword docstrings for __FILE__ and __LINE__. (bug #59737) * libinterp/op-kw-docs: Add new docstring entries for __FILE__ and __LINE__ keywords.
author Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
date Wed, 07 Feb 2024 12:26:48 -0500
parents 489aead3a0f5
children 67e2f8a62cac 360bb7c222c4
files libinterp/op-kw-docs
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/op-kw-docs	Wed Feb 07 11:47:40 2024 -0500
+++ b/libinterp/op-kw-docs	Wed Feb 07 12:26:48 2024 -0500
@@ -421,6 +421,26 @@
 Object Oriented Programming for a detailed description.)
 @seealso{function, functions, func2str, str2func}
 @end deftypefn
+__FILE__
+@c libinterp/parse-tree/lex.ll
+-*- texinfo -*-
+@deftypefn {} {} __FILE__
+When the lexer recognizes the @qcode{"__FILE__"} keyword it returns a
+character array containing the full name and path of the file that is being
+executed. @qcode{"__FILE__"} will return @code{stdin} if called from the
+command line.
+@seealso{__LINE__}
+@end deftypefn
+__LINE__
+@c libinterp/parse-tree/lex.ll
+-*- texinfo -*-
+@deftypefn {} {} __LINE__
+When the lexer recognizes the @qcode{"__LINE__"} keyword it returns a numeric
+value containing the current input line number of the function or file being
+executed.  @qcode{"__LINE__"} will return @code{1} if called from the command
+line.
+@seealso{__FILE__}
+@end deftypefn
 break
 @c libinterp/parse-tree/oct-parse.yy
 -*- texinfo -*-