Skip to content

Commit abc7f82

Browse files
committed
Updated changelog.
1 parent 87fad95 commit abc7f82

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

Changelog.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Changelog
22
LuaPreprocess
33

4+
v1.17 (2021-11-22)
5+
Library:
6+
- Added predefined macros @@ASSERT() and @@LOG().
7+
- Added params.release and params.logLevel for controlling aspects of the predefined macros.
8+
- Added params.macroPrefix and params.macroSuffix (e.g. make @@FOO() call the function MACRO_FOO()).
9+
Command line program:
10+
- Added support for using stdin/stdout as input/output. (Specify "-" as the file path.)
11+
- Added --release and --loglevel options.
12+
413
v1.16 (2021-11-16)
514
Library:
615
- Added preprocessor symbols (in the form of '$name').

preprocess.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
- getOutputSoFar, getOutputSizeSoFar, getCurrentLineNumberInOutput
2828
- outputValue, outputLua, outputLuaTemplate
2929
- startInterceptingOutput, stopInterceptingOutput
30-
Macros (search for 'PredefinedMacros'):
30+
Macros:
3131
- ASSERT
3232
- LOG
33-
Search this file for 'EnvironmentTable' for more info.
33+
Search this file for 'EnvironmentTable' and 'PredefinedMacros' for more info.
3434
3535
Exported stuff from the library:
3636
- (all the functions above)
@@ -127,7 +127,7 @@
127127

128128

129129

130-
local PP_VERSION = "1.16.0-dev"
130+
local PP_VERSION = "1.17.0"
131131

132132
local MAX_DUPLICATE_FILE_INSERTS = 1000 -- @Incomplete: Make this a parameter for processFile()/processString().
133133

@@ -1873,8 +1873,8 @@ end
18731873

18741874
-- ASSERT()
18751875
-- @@ASSERT( condition [, message=auto ] )
1876-
-- Macro. Does nothing if params.release is set, otherwise calls error() if
1877-
-- the condition fails. The message is only evaluated if the condition fails.
1876+
-- Macro. Does nothing if params.release is set, otherwise calls error() if the
1877+
-- condition fails. The message argument is only evaluated if the condition fails.
18781878
function metaFuncs.ASSERT(conditionCode, messageCode)
18791879
errorIfNotRunningMeta(2)
18801880
if not conditionCode then error("missing argument #1 to 'ASSERT'", 2) end
@@ -1903,8 +1903,8 @@ end
19031903
-- Macro. Does nothing if logLevel is lower than params.logLevel,
19041904
-- otherwise prints a value[1] or a formatted message[2].
19051905
--
1906-
-- logLevel can be "error" (level 1), "warning" (level 2),
1907-
-- "info" (level 3), "debug" (level 4) or "trace" (level 5).
1906+
-- logLevel can be "error", "warning", "info", "debug" or "trace"
1907+
-- (from highest to lowest priority).
19081908
--
19091909
function metaFuncs.LOG(logLevelCode, valueOrFormatCode, ...)
19101910
errorIfNotRunningMeta(2)

tests/suite.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ doTest("Predefined macros", function()
388388
assertCodeOutput(luaOut, [[if not (foo) then error("Assertion failed: foo") end]])
389389

390390
local luaOut = assert(pp.processString{ code=[[
391-
@@ASSERT(foo ~= "bad", "Bad foo: "..foo)
391+
@@ASSERT(foo ~= "good", "Bad foo: "..foo)
392392
]]})
393-
assertCodeOutput(luaOut, [[if not (foo ~= "bad") then error(("Bad foo: "..foo)) end]])
393+
assertCodeOutput(luaOut, [[if not (foo ~= "good") then error(("Bad foo: "..foo)) end]])
394394

395395
-- @@LOG()
396396
local luaOut = assert(pp.processString{ logLevel="error", code=[[

0 commit comments

Comments
 (0)