From 16b93b98516df3fcc79a52847fa89fdda5b187c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Fri, 5 Oct 2018 10:05:59 +0200 Subject: epp: Allow user to set source name independently of input file name Note that this does *not* affect -include()'d files or the -file() directive. --- lib/stdlib/doc/src/epp.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/stdlib/doc/src') diff --git a/lib/stdlib/doc/src/epp.xml b/lib/stdlib/doc/src/epp.xml index 1dc0161398..d803d259aa 100644 --- a/lib/stdlib/doc/src/epp.xml +++ b/lib/stdlib/doc/src/epp.xml @@ -124,6 +124,10 @@ Open a file for preprocessing.

Opens a file for preprocessing.

+

If you want to change the file name of the implicit -file() + attributes inserted during preprocessing, you can do with + {source_name, SourceName}. If unset it will + default to the name of the opened file.

If extra is specified in Options, the return value is {ok, Epp, Extra} instead @@ -169,6 +173,10 @@

Preprocesses and parses an Erlang source file. Notice that tuple {eof, Line} returned at the end of the file is included as a "form".

+

If you want to change the file name of the implicit -file() + attributes inserted during preprocessing, you can do with + {source_name, SourceName}. If unset it will + default to the name of the opened file.

If extra is specified in Options, the return value is {ok, [Form], Extra} instead -- cgit v1.2.3