aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.moon
AgeCommit message (Collapse)Author
2019-03-13Added fix for "_end"Bruce Hill
2019-03-09Added some support for auto-upgrade, tidied up a bitBruce Hill
2019-02-06Added underscores for numbers (e.g. 1_000, 0xDEAD_BEEF), and fixed someBruce Hill
compatibility and decompiling issues.
2019-02-05Bunch of changes:Bruce Hill
- Added shebangs to generated code output - SyntaxTree:map() -> SyntaxTree:with(), and corresponding changes to metaprogramming API - Added (return Lua 1) shorthand for (return (Lua 1)) - (1 and 2 and 3) compile rule mapping to -> (1 and (*extra arguments*)) - Don't scan for errors, just report them when compiling - Syntax changes: - Added prefix actions (e.g. #$foo) - Operator chars now include utf8 chars - Ditch "escaped nomsu" type (use (\ 1) compile action instead)
2019-01-29Switched to have colors/utf8 be optional, fixed an issue with currentlyBruce Hill
running files leaking when errors occurred (causing spurious circular import errors), and improved tutorial.
2019-01-27Fail no longer prepends 'Failure:' automatically, now fail_at() does ifBruce Hill
no prefix is there.
2019-01-25Added metatables for bool, number, function, coroutine. AddedBruce Hill
run-time check to make sure precompiled code used the same version of Lua. Methods can now be used in (* compiles to *), etc.
2019-01-22Switched compiler to produce Text("hello ", name) instead of ("helloBruce Hill
"..tostring(name))
2019-01-22Moved all the text method stuff into text.moon instead of splittingBruce Hill
across string2/containers. Modified the type stuff to output better type names and use (a Dict) and (a List) instead of (Dict) and (List). (Text) now also has a proper constructor. (assume) now also handles a bunch of different assumptions with smart error messages.
2019-01-18Added `tree` back as a parameter to compile actions, which helps withBruce Hill
better error reporting, e.g. for (fail) (no arguments). Overall better error reporting now. Also added shorthand ("Action" tree with ...) for (SyntaxTree {.type = "Action", .1 = ...}).
2019-01-16Better error messaging (using pretty_error in more places)Bruce Hill
2019-01-15Removed debug code.Bruce Hill
2019-01-14Overhaul in progress, mostly working. Moved all the nomsu packages intoBruce Hill
lib/, including core/*. Changes to how nomsu environments and importing work.
2019-01-10Major overhaul of how modules and environments work, along with someBruce Hill
steamlining and tweaks to the makefile. Version bump: 6.14.13.8
2019-01-07Fix for text interpolation of numbers.Bruce Hill
2019-01-01Some changes to the error API, a fix for statement block parsing, andBruce Hill
replacing ((foo 1 baz)'s meaning) with $(foo 1 baz).
2019-01-01Added support for $(foo 1 baz 2) as a way to access (foo 1 baz 2)'sBruce Hill
meaning.
2019-01-01Misc changes, including text indented interpolations are now indentedBruce Hill
relative to the text, not the opening '("', code objects can now remove all free vars, the REPL uses global vars. Error API is changing a bit.
2018-12-18Initial pass on updating syntax.Bruce Hill
2018-12-14Codegen tweakBruce Hill
2018-12-14Updating to support multiple method calls.Bruce Hill
2018-12-14Initial setup work for syntax version 5.Bruce Hill
2018-12-13Cleanups and codegen improvements/fixes.Bruce Hill
2018-11-29Renamed append/concat_append to add/concat_add for Code objects.Bruce Hill
2018-11-29Extended text comprehensions to Lua constructors.Bruce Hill
2018-11-29Added text comprehensions (in the style of the list/dict ones)Bruce Hill
2018-11-26Simplifying the control flow API and deduplicating the code.Bruce Hill
2018-11-23Tweaks and tidying.Bruce Hill
2018-11-19Tweaks and API cleanup.Bruce Hill
2018-11-17In-progress (but working) overhaul of some elements including: functionBruce Hill
calls, lib/thing.nom API, multi-assignments, varargs, etc.
2018-11-11Re-implemented nomsu -> lua comment translation and added file chunkBruce Hill
comments.
2018-11-11Fixed -O optimization flag.Bruce Hill
2018-11-09No longer passing `tree` to every compile action. Now, you can justBruce Hill
return a LuaCode object, and it will automatically get a source from `tree` if it didn't already have a source. Plus some fixes/cleanup.
2018-11-09Lots of cleanups, including expanded use of (... compiles to "textBruce Hill
literal") shorthand, deprecating Lua value, and more use of Lua "..." with text interpolations.
2018-11-08Major overhaul, splitting nomsu_compiler into nomsu_environment,Bruce Hill
nomsu_compiler, and nomsu_decompiler. Also added comprehensions.
2018-11-06Removed utils.lua, simplified some metaprogramming stuff, added native supportBruce Hill
for calling functions with (%a %b %c) instead of (call %a with [%b, %c]), renamed _List -> List, _Dict -> Dict, improved example code.
2018-11-02Changed stub convention to (foo 1 baz 2) -> foo_1_baz instead ofBruce Hill
foo_1_baz_2, removed "smext", made some cleanup changes.
2018-10-31Simplified AST to just use a single moonscript class called "SyntaxTree"Bruce Hill
instead of a different metatable for each type of syntax tree.
2018-10-31Bumped version number, fixed REPL, and simplified/fixed (use %).Bruce Hill
2018-10-30Fully working version of (action [foo]: baz) -> ((foo) means: baz)Bruce Hill
refactor and misc other changes.
2018-10-30Fix for compiler not parenthesizing method targets, fix for parser notBruce Hill
recognizing \ line continuation, and improvements to upgrade tool API.
2018-10-30Versioning fixes.Bruce Hill
2018-10-29Bumped compiler version.Bruce Hill
2018-10-29Some cleanups and fixes, made the parser more permissive of prematurelyBruce Hill
terminated files.
2018-09-26Fixes for actions with targets colliding with compiler actions, and luaBruce Hill
keywords as dict keys.
2018-09-21Incremental checkin, currently not working, just saving progress.Bruce Hill
2018-09-18Got rid of repr() use and replaced with :as_lua() or :as_nomsu() in asBruce Hill
many places as possible.
2018-09-17Added support for compile actions returning trees, and compiling blocksBruce Hill
into values.
2018-09-16Added support for compile actions returning syntax trees, which will getBruce Hill
recompiled until they produce Lua code.
2018-09-16Much better error reporting for compile errors (i.e. not parse errors),Bruce Hill
using the pretty_error system.