diff options
author | John Högberg <[email protected]> | 2018-10-05 10:05:59 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-10-05 11:47:57 +0200 |
commit | 16b93b98516df3fcc79a52847fa89fdda5b187c0 (patch) | |
tree | a39706139c19fa1387057b9affc5d89cce963bf3 /lib/stdlib/doc/src | |
parent | 18a742fa6d52999d0ba415330ba2168caaeb1256 (diff) | |
download | otp-16b93b98516df3fcc79a52847fa89fdda5b187c0.tar.gz otp-16b93b98516df3fcc79a52847fa89fdda5b187c0.tar.bz2 otp-16b93b98516df3fcc79a52847fa89fdda5b187c0.zip |
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.
Diffstat (limited to 'lib/stdlib/doc/src')
-rw-r--r-- | lib/stdlib/doc/src/epp.xml | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ <fsummary>Open a file for preprocessing.</fsummary> <desc> <p>Opens a file for preprocessing.</p> + <p>If you want to change the file name of the implicit -file() + attributes inserted during preprocessing, you can do with + <c>{source_name, <anno>SourceName</anno>}</c>. If unset it will + default to the name of the opened file.</p> <p>If <c>extra</c> is specified in <c><anno>Options</anno></c>, the return value is <c>{ok, <anno>Epp</anno>, <anno>Extra</anno>}</c> instead @@ -169,6 +173,10 @@ <p>Preprocesses and parses an Erlang source file. Notice that tuple <c>{eof, <anno>Line</anno>}</c> returned at the end of the file is included as a "form".</p> + <p>If you want to change the file name of the implicit -file() + attributes inserted during preprocessing, you can do with + <c>{source_name, <anno>SourceName</anno>}</c>. If unset it will + default to the name of the opened file.</p> <p>If <c>extra</c> is specified in <c><anno>Options</anno></c>, the return value is <c>{ok, [<anno>Form</anno>], <anno>Extra</anno>}</c> instead |