Releases: ReFreezed/LuaPreprocess
Releases · ReFreezed/LuaPreprocess
Version 1.21
Changes since 1.20
Library:
- Added params.strictMacroArguments (which is enabled by default). Macro arguments are validated to be Lua expressions once again, unless
strictMacroArgumentsis disabled. - Added the metaprogram code as an argument to params.onBeforeMeta().
- Added functions: callMacro(), isProcessing().
- params.onBeforeMeta() is now only called, and
*.meta.luafiles are only written, if processing is necessary (i.e. not for plain Lua files in most cases). - Plain Lua files should process a bit faster.
- Checking that params.pathMeta isn't the same as the input or output path.
- Error messages showing lots of code are now shortened.
- Fixed evaluate() treating empty code as a valid expression.
Command line program:
- Added option: --nostrictmacroarguments.
- Added the metaprogram code as an argument to the "beforemeta" message handler.
- The "beforemeta" message is now only sent, and
*.meta.luafiles are only written, if processing is necessary (i.e. not for plain Lua files in most cases).
Version 1.20
Changes since 1.19
Library:
- getOutputSoFar() can now take an output buffer argument.
- Detecting duplicate names in dual code:
!!x, x = ... - Fixed
evaluate()sometimes raising an error instead of returning it. - Fixed issue with files not ending with a newline.
- Fixed silly internal error when Lua 5.2+ was used.
Command line program:
- Added options: --version, --help.
- Added "alldone" message.
- --meta can now take a file path.
- Fixed silly internal error when Lua 5.2+ was used.
Repository:
- Fixed test suite not working in Lua 5.2+. Oops!
Version 1.19
Changes since 1.18
Library:
- All uses of
!now work in macros. - Added functions: getIndentation(), getCurrentIndentationInOutput(), getOutputSoFarOnLine(), writeFile().
- Added function readFile() as alias for getFileContents(). (The latter is now deprecated.)
- Added environment argument to evaluate().
pp.metaEnvironmentis now only a shallow copy of_G(i.e.pp.metaEnvironment.io == _G.ioetc.).- LuaJIT: Added support for binary numerals (i.e.
0b110010).
Version 1.18
Changes since 1.17
Library:
- Added functions: loadResource(), evaluate(), pairsSorted(), sortNatural() and compareNatural().
- $symbol now accepts callable tables in addition to functions.
- Argument expressions for macros are no longer validated. This was inconsistent before as they were only validated when not containing preprocessor code, like
@@foo(!!(bar)).
Version 1.17
Changes
Library:
- Added predefined macros @@ASSERT() and @@LOG().
- Added
params.releaseandparams.logLevelfor controlling aspects of the predefined macros. (See processFile().) - Added
params.macroPrefixandparams.macroSuffix(e.g. make@@FOO()call the functionMACRO_FOO()).
Command line program:
- Added support for using stdin/stdout as input/output. (Specify
"-"as the file path.) - Added
--releaseand--logleveloptions. - Added
--macroprefixand--macrosuffixoptions.
Version 1.16
Changes
Library:
- Added preprocessor symbols (in the form of
$name). - Added functions: startInterceptingOutput(), stopInterceptingOutput().
- Macros can use
outputLua()and co. instead of returning code. - Detecting errors such as
!(x,y).
Version 1.15
Check out the new syntax highlighter tool on the website!
Changes
Library:
- Added functions: getOutputSoFar(), getOutputSizeSoFar(), getCurrentLineNumberInOutput().
- outputValue() with multiple values will now output commas between the values.
- Added
@insert func!(...)as syntax sugar for@insert func(!(...)). - Added
@insert func!!(...)as syntax sugar for@insert func(!!(...)).
Command line program:
- Added --nogc option.
Version 1.14
Version 1.13.2
Changes
Command line program:
- Fixed internal error when reporting a user error.
Version 1.13.1
Changes
Library:
- Dual code now supports multiple assignment targets:
!!x, y = ... - Some non-ASCII characters in serialized strings look nicer.
- Added params.fastStrings.
- Fixed backtick strings not working in macros.
Command line program:
- Added --faststrings option.