-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathChangelog.txt
208 lines (179 loc) · 8.21 KB
/
Changelog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
Changelog
LuaPreprocess
v1.21 (2022-07-08)
Library:
- Added params.strictMacroArguments (which is enabled by default). Macro arguments are validated to be Lua expressions once again, unless strictMacroArguments is disabled.
- Added the metaprogram code as an argument to params.onBeforeMeta().
- Added functions: callMacro(), isProcessing().
- params.onBeforeMeta() is now only called, and .meta.lua files 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.lua files are only written, if processing is necessary (i.e. not for plain Lua files in most cases).
v1.20 (2022-07-01)
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!
v1.19 (2022-06-20)
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.metaEnvironment is now only a shallow copy of _G (i.e. 'pp.metaEnvironment.io == _G.io' etc.).
- LuaJIT: Added support for binary numerals (i.e. 0b110010).
v1.18 (2022-03-19)
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)).
v1.17 (2021-11-22)
Library:
- Added predefined macros @@ASSERT() and @@LOG().
- Added params.release and params.logLevel for controlling aspects of the predefined macros.
- Added params.macroPrefix and params.macroSuffix (e.g. make @@FOO() call the function MACRO_FOO()).
Command line program:
- Added support for using stdin/stdout as input/output. (Specify "-" as the file path.)
- Added --release and --loglevel options.
- Added --macroprefix and --macrosuffix options.
v1.16 (2021-11-16)
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).
v1.15 (2021-08-01)
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.
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.
v1.13.1 (2021-05-16)
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.
v1.13 (2021-05-14)
Library:
- Added macros (in the form of '@insert func()' or '@@func()').
- Fixed processedFileInfo.hasPreprocessorCode being false even though @keywords were present.
- processedFileInfo.hasPreprocessorCode now means anything that isn't pure Lua.
- Added processedFileInfo.hasMetaprogram .
- Revised the whole error handling system. (Things should be more stable and nicer now.)
- Fixed errors getting printed to stdout instead of stderr.
Command line program:
- Fixed additional stack overflow error when there's an error in the "fileerror" message handler.
v1.12 (2021-01-25)
Library:
- Added support for LuaJIT-specific syntax.
- Output validation can be disabled with params.validate=false .
- Added aliases for some number formats.
- Fixed parsing of &, | and ~ operators.
Command line program:
- Added --jitsyntax and --novalidate options.
v1.11.2 (2021-01-05)
Library:
- Fixed parsing of numbers ending with a point.
Command line program:
- Added --backtickstrings and --nonil options (for specifying params.backtickStrings and params.canOutputNil).
v1.11.1 (2020-09-27)
Library:
- Huge numbers are now outputted as 1/0 instead of math.huge .
- Fixed newToken("pp_keyword",...) not accepting all preprocessor keywords.
- Better error message for unescaped newlines in string literals.
v1.11 (2020-03-23)
Library:
- Added params.onInsert() which can be used to change what @insert inserts.
- Added params.canOutputNil for disallowing !() and outputValue() from outputting nil.
- Added @file and @line keywords.
- Outputted strings now have more characters escaped.
- params.onAfterMeta() can now prepend shebang to the code without causing a code validation error.
- Fixed sometimes bad output when a preprocessor line ended with a comment.
- Fixed an internal error.
Command line program:
- Added message: "insert".
v1.10 (2019-09-25)
Library:
- Added the concept of preprocessor keywords in the form of @keyword.
- Added @insert.
- Added processedFileInfo.insertedFiles .
v1.9 (2019-08-02)
Library:
- run() can now send arguments to the executed file.
- Fixed issues when the last line in a file was a preprocessor line.
Command line program:
- Added --outputpaths option for specifying an output path for each input path.
- Added outputPaths argument to "init" message.
- Added processedFileInfo.outputPath .
- Added some short-form options.
- Updated byte units. (Now displaying KiB instead of kB etc.)
v1.8 (2019-05-25)
Library:
- Added functions: copyTable(), pack(), getCurrentPathIn(), getCurrentPathOut().
- Fixed an issue with whitespace after '!...'.
- Fixed tokenize() raising an error instead of returning the error message.
- Updated/fixed various other error handling stuff.
Command line program:
- Added --data option.
- The message handler can now be a table of functions.
- Added "fileerror" message.
v1.7 (2019-04-28)
- Hexadecimal fractions and binary exponents are now handled (e.g. 0x12a.8bP+2).
- Added missing token '::'.
- Added getNextUsefulToken().
- Dual code now only accepts a single assignment statement on the line.
- Updated detection of malformed numbers.
- Fixed internal error "error object is a nil value" in Lua 5.3.
v1.6 (2019-03-02)
- Added backtick strings.
- Added more functions for handling tokens (removeUselessTokens(), eachToken(), isToken()).
- Renamed the command line program (main.lua) to preprocess-cl.lua .
v1.5 (2019-02-22)
- Changed/improved '!!...'.
- Fixed an internal "trying to call nil" error.
v1.4 (2019-01-16)
- Added support for Lua 5.2 and 5.3.
- Fixed some error handling stuff.
v1.3.1 (2019-01-09)
- Fixed returned value from params.onAfterMeta() not getting used.
v1.3 (2019-01-05)
- Added processedFileInfo.linesOfCode to processFile()/processString().
- --saveinfo option now saves all info that processFile() returns for each file.
- Added concatTokens().
v1.2 (2019-01-03)
- Added processString().
v1.1.1 (2019-01-02)
- (No info)
v1.1 (2018-12-22)
- (No info)
v1.0 (2018-11-02)
- Initial release!