diff --git a/.gitignore b/.gitignore index 79ee476..ca50336 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ local/ /*.sublime-* /.run -/wiki/ /tests/quickTest.lua /tests/quickTest.meta.lua diff --git a/Changelog.txt b/Changelog.txt index c1e4c21..2eff8ec 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,14 @@ Changelog LuaPreprocess +v1.14 (2021-07-13) +Library: +- !(), !!() and @insert now work in macros. +- Macro names can now contain lookups. +- Updated string serialization, including for newToken("string"). +- Fixed error in output for '@line..""'. +- Improved some error messages. + v1.13.2 (2021-05-30) Command line program: - Fixed internal error when reporting a user error. diff --git a/preprocess.lua b/preprocess.lua index 339a941..b17aba8 100644 --- a/preprocess.lua +++ b/preprocess.lua @@ -44,7 +44,7 @@ !... The line will simply run during preprocessing. The line can span multiple actual lines if it contains brackets. !!... The line will appear in both the metaprogram and the final program. The line must be an assignment. !(...) The result of the parenthesis will be outputted as a literal if it's an expression, otherwise it'll just run. - !!(...) The expression in the parenthesis will be outputted as Lua code. The expression must result in a string. + !!(...) The result of the expression in the parenthesis will be outputted as Lua code. The result must be a string. Short examples: @@ -58,6 +58,9 @@ local font = !!(isDeveloper and "loadDevFont()" or "loadUserFont()") + -- See the full documentation for additional features: + -- http://luapreprocess.refreezed.com/docs/extra-functionality/ + ---------------------------------------------------------------- -- Example program: @@ -112,13 +115,14 @@ -- Though in this specific case a preprocessor line (without the parenthesis) would be nicer: !func() - -- For the full documentation, see: http://luapreprocess.refreezed.com/docs/ + -- For the full documentation, see: + -- http://luapreprocess.refreezed.com/docs/ --============================================================]] -local PP_VERSION = "1.13.2" +local PP_VERSION = "1.14.0" local MAX_DUPLICATE_FILE_INSERTS = 1000 -- @Incomplete: Make this a parameter for processFile()/processString().