Skip to content

Releases: JanSharp/phobos

v0.1.5

03 Oct 09:48

Choose a tag to compare

Release Types

  • Phobos for <platform> contains all files required to run Phobos as a command line tool.
    This includes built binaries for Lua and LuaFileSystem which are required to run Phobos.
  • Phobos Raw contains the same as above, except built Lua and LuaFileSystem binaries.
    This is useful when you wish to use your own build of Lua and LuaFileSystem,
    or when you wish to use Phobos as a library for your project.
    (Note: Library package might be its own package in the future.)
  • Phobos Factorio Mod is the same package which is uploaded to the Factorio Mod Portal.
    In short, it is the library equivalent of Phobos within Factorio, but see the README for more info.

Changelog

Bugfixes

  • Fix error when the optional '--ignore' argument was not specified

v0.1.4

10 Feb 06:43

Choose a tag to compare

Release Types

  • Phobos for <platform> contains all files required to run Phobos as a command line tool.
    This includes built binaries for Lua and LuaFileSystem which are required to run Phobos.
  • Phobos Raw contains the same as above, except built Lua and LuaFileSystem binaries.
    This is useful when you wish to use your own build of Lua and LuaFileSystem,
    or when you wish to use Phobos as a library for your project.
    (Note: Library package might be its own package in the future.)
  • Phobos Factorio Mod is the same package which is uploaded to the Factorio Mod Portal.
    In short, it is the library equivalent of Phobos within Factorio, but see the README for more info.

Changelog

Minor Features

  • Add --version argument
  • Add a human readable header stating the Phobos version in output files with --use-load
  • Add --custom-header to include a little extra description in the header mentioned above
  • Support files with a shebang
  • Handle invalid nodes in the formatter
  • Implement parsing and compiling as 32 bit signed integer numbers instead of doubles

Changes

  • Change output of --use-load making it 40-50% smaller, a little bit bigger than raw bytecode
  • Cleanup, improve and update the README and add a docs folder
  • Emit null strings in bytecode wherever null is valid instead of falling back to ""
  • Replace stat_elem internally everywhere by using intrusive linked lists
  • Parse malformed numbers just like Lua parses them resulting in more useful syntax errors

Bugfixes

  • Fix 'lua.exe' not finding 'lua52.dll' because it was called 'lua.dll'
  • Fix (foo()) being a valid statement
  • Fix strings in invalid contexts generating invalid AstTokenNodes or failing assertions
  • Fix the local variable for 'fornum' being in the parent scope in the AST
  • Fix unterminated block strings with leading newlines missing said newline in the invalid node
  • Fix unterminated block comments not emitting invalid nodes, so no syntax errors
  • Fix potentially invalid or broken bytecode in functions with more than 256 constants
  • Fix hexadecimal numbers with hex letters in their exponent (malformed) failing assertions

v0.1.3

17 Feb 23:10

Choose a tag to compare

Release Types

  • Phobos for <platform> contains all files required to run Phobos as a command line tool.
    This includes built binaries for Lua and LuaFileSystem which are required to run Phobos.
  • Phobos Raw contains the same as above, except built Lua and LuaFileSystem binaries.
    This is useful when you wish to use your own build of Lua and LuaFileSystem,
    or when you wish to use Phobos as a library for your project.
    (Note: Library package might be its own package in the future.)
  • Phobos Factorio Mod is the same package which is uploaded to the Factorio Mod Portal.
    In short, it is the library equivalent of Phobos within Factorio, but see the README for more info.

Changelog

Minor Features

  • Add error codes. Makes errors much easier to distinguish when using Phobos as a library
  • Keep all data about the source in the AST regardless of how many syntax errors there might be

Bugfixes

  • Fix every package missing the 'lib' and 'optimize' sub directories. 0.1.2 was/is unusable
  • Fix '\r' and '\r\n' resulting in '\r' instead of '\n' in blank tokens
  • Fix unescaped '\r' in strings not causing syntax errors and breaking line numbers
  • Fix too large decimal escape sequences crashing in the tokenizer. For example '\256'
  • Fix string and comment tokens sometimes having incorrect line:column positions
  • Fix ']' inside block strings disappearing
  • Fix (foo..bar)..baz performing bar..baz first. Only matters when using __concat
  • Fix parenthesis inside of concat chains not being representable inside the AST (data loss)
  • Fix the condition for repeatstat resolving references starting at the parent scope
    For example the condition in repeat local foo; until foo would index into _ENV
  • Fix scope bodies referring to the parent scope instead of the current scope
  • Fix 'goto's to the end of a repeatstat block being allowed no matter what
  • Fix jump_linker attempting to concatenate nil when the given AST does not have debug
    information and contains an invalid jump
  • Fix backwards 'goto' jumping to the outer most label with the same name instead of inner

v0.1.2

29 Jan 02:11

Choose a tag to compare

Release Types

  • Phobos for <platform> contains all files required to run Phobos as a command line tool.
    This includes built binaries for Lua and LuaFileSystem which are required to run Phobos.
  • Phobos Raw contains the same as above, except built Lua and LuaFileSystem binaries.
    This is useful when you wish to use your own build of Lua and LuaFileSystem,
    or when you wish to use Phobos as a library for your project.
    (Note: Library package might be its own package in the future.)
  • Phobos Factorio Mod is the same package which is uploaded to the Factorio Mod Portal.
    In short, it is the library equivalent of Phobos within Factorio, but see the README for more info.

Changelog

Features

  • Add continuing parsing after encountering syntax errors

Changes

  • Set linux lua executable flag PR#1

Bugfixes

  • Fix error when requiring files using non normalized module names in Factorio
  • Fix vararg expressions sometimes not assigning values properly
    (for example local foo, bar; foo, bar = ..., while local foo, bar = ... worked)
  • Fix call or vararg expressions wrapped in () not forcing single results and potentially
    not even assigning to the right registers (for example local foo, bar; foo, bar = (...))
  • Fix '\r\n' (or '\n\r' which shouldn't - but can - exist) breaking escaped newlines in strings
    In fact '\r' was mostly unhandled. Now all newlines get properly normalized to '\n' just like
    they do in regular Lua

v0.1.1

25 Oct 19:44

Choose a tag to compare

Release Types

  • Phobos for <platform> contains all files required to run Phobos as a command line tool.
    This includes built binaries for Lua and LuaFileSystem which are required to run Phobos.
  • Phobos Raw contains the same as above, except built Lua and LuaFileSystem binaries.
    This is useful when you wish to use your own build of Lua and LuaFileSystem,
    or when you wish to use Phobos as a library for your project.
    (Note: Library package might be its own package in the future.)
  • Phobos Factorio Mod is the same package which is uploaded to the Factorio Mod Portal.
    In short, it is the library equivalent of Phobos within Factorio, but see the README for more info.

Changelog

Changes

  • Fix missing thumbnail on mod portal

v0.1.0

25 Oct 19:09

Choose a tag to compare

Release Types

  • Phobos for <platform> contains all files required to run Phobos as a command line tool.
    This includes built binaries for Lua and LuaFileSystem which are required to run Phobos.
  • Phobos Raw contains the same as above, except built Lua and LuaFileSystem binaries.
    This is useful when you wish to use your own build of Lua and LuaFileSystem,
    or when you wish to use Phobos as a library for your project.
    (Note: Library package might be its own package in the future.)
  • Phobos Factorio Mod is the same package which is uploaded to the Factorio Mod Portal.
    In short, it is the library equivalent of Phobos within Factorio, but see the README for more info.

Changelog

Major Features

  • Add command line tool for compiling
  • Implement parsing of Lua 5.2 source code to AST
  • Implement formatting AST to Lua 5.2 source code without making any format changes
    (except concats with parenthesis in the middle of them)
  • Implement compiling AST to Lua 5.2 bytecode
  • Implement disassembing Lua 5.2 bytecode to AST

Minor Features

  • Add Phobos Debug Symbols v0 for use by third party tools (not Lua itself)

Features

  • Add Factorio in game commands to execute phobos code similar to regular Lua commands
  • Add cmd option to compile to bytecode files or text files that load a bytecode string
  • Add cmd option to change the source name used for compiled bytecode functions for debugging
  • Add cmd option to monitor memory during compilation
  • Add cmd option to ignore and continue past files with syntax errors
  • Add WIP cmd option for build profiles (debug or release)

Optimizations

  • Implement folding pure const expressions
  • Implement folding control statements with pure const conditions

Scripting

  • Add WIP cmd AST injection scripts during compilation