Skip to content

Releases: ReFreezed/LuaPreprocess

Version 1.13

14 May 20:24
Compare
Choose a tag to compare

Changes

Library:

Command line program:

  • Fixed additional stack overflow error when there's an error in the "fileerror" message handler.

Version 1.12

25 Jan 15:54
Compare
Choose a tag to compare

Changes

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:

Version 1.11.2

05 Jan 01:41
Compare
Choose a tag to compare

Changes

Library:

  • Fixed parsing of numbers ending with a point.

Command line program:

Version 1.11.1

26 Sep 22:52
Compare
Choose a tag to compare

Changes

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.

Other:

Version 1.11

23 Mar 18:34
Compare
Choose a tag to compare

Changes

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:

Version 1.10

24 Sep 23:01
Compare
Choose a tag to compare

Changes

Library:

Version 1.9

02 Aug 15:30
Compare
Choose a tag to compare

Changes

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.)

Version 1.8

25 May 16:32
Compare
Choose a tag to compare

Changes

Library:

  • Added functions: copyTable(), pack(), getCurrentPathIn(), getCurrentPathOut().
  • Fixed an issue with whitespace after !....
  • Fixed tokenize() triggering 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.

Version 1.7

28 Apr 20:16
Compare
Choose a tag to compare

Changes:

  • Hexadecimal fractions & 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.

Version 1.6

02 Mar 14:02
Compare
Choose a tag to compare

Changes:

  • Added backtick strings (see below).
  • Added more functions for handling tokens (removeUselessTokens(), eachToken(), isToken()).
  • Renamed the command line program (main.lua) to preprocess-cl.lua.

Backtick strings, enabled with params.backtickStrings, allows the backtick character (`) to be used as string literal delimiters. This hack can be nice if you, for example, have Lua code inside strings and want to trick your text editor to apply syntax highlighting to the string contents as if it was normal Lua.

local functionString = `function sayHello() print("Hello!") end`
outputLua(functionString)