Commit Graph

763 Commits

Author SHA1 Message Date
fa3f598fc3 Fixing the upgrade pipeline, plus some misc. fixes. 2018-11-09 17:02:53 -08:00
69aaea030e No longer passing tree to every compile action. Now, you can just
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-09 16:41:19 -08:00
a2f07415c5 Deprecating (% as lua statements) and (% as lua return) 2018-11-09 14:48:40 -08:00
7d2b7199d8 Lots of cleanups, including expanded use of (... compiles to "text
literal") shorthand, deprecating Lua value, and more use of Lua "..."
with text interpolations.
2018-11-09 14:37:22 -08:00
ba96cdfa07 Fixes/upgrades. 2018-11-08 16:59:10 -08:00
652c29bdef Major overhaul, splitting nomsu_compiler into nomsu_environment,
nomsu_compiler, and nomsu_decompiler. Also added comprehensions.
2018-11-08 15:24:15 -08:00
1f3660f393 Added things library (improved version of lib/object.nom). 2018-11-06 15:15:21 -08:00
c8ccbe5f42 Removed utils.lua, simplified some metaprogramming stuff, added native support
for calling functions with (%a %b %c) instead of (call %a with [%b,
%c]), renamed _List -> List, _Dict -> Dict, improved example code.
2018-11-06 15:15:14 -08:00
0f17c5eb9a Merge branch 'master' into working 2018-11-02 15:17:49 -07:00
dc41f30c73 Tweak 2018-11-02 15:10:22 -07:00
307dea1881 Changed stub convention to (foo 1 baz 2) -> foo_1_baz instead of
foo_1_baz_2, removed "smext", made some cleanup changes.
2018-11-02 14:39:23 -07:00
d0c3c57f7b Simplified AST to just use a single moonscript class called "SyntaxTree"
instead of a different metatable for each type of syntax tree.
2018-10-31 15:54:51 -07:00
ec92b0fccd More explicit. 2018-10-31 15:10:03 -07:00
7a35e38d87 Renamed (action %) -> (%'s meaning) 2018-10-31 15:05:17 -07:00
f43d8c58f7 Added upgrade file. 2018-10-31 03:54:16 -07:00
83219f8522 Bumped version number, fixed REPL, and simplified/fixed (use %). 2018-10-31 03:52:00 -07:00
ea3197aaff Fully working version of (action [foo]: baz) -> ((foo) means: baz)
refactor and misc other changes.
2018-10-30 23:42:36 -07:00
e7e84c9eda Fix for compiler not parenthesizing method targets, fix for parser not
recognizing \ line continuation, and improvements to
upgrade tool API.
2018-10-30 20:32:49 -07:00
fdf7a537c8 Versioning fixes. 2018-10-30 19:50:20 -07:00
8515a87427 Bumped compiler version. 2018-10-29 13:03:19 -07:00
23abab4f80 Some cleanups and fixes, made the parser more permissive of prematurely
terminated files.
2018-10-29 13:00:30 -07:00
be1df7ccd3 Recompile 2018-10-03 16:26:50 -07:00
2f68357cb6 Some incremental progress. 2018-10-03 16:26:29 -07:00
b615cb5c8e Fixed up some edge cases with as_lua_id and from_lua_id that were
producing bad results.
2018-10-03 16:14:37 -07:00
331b22b3a3 Got compiler errors actually working. 2018-10-01 15:25:27 -07:00
1a3137a210 Fixed some misnamed functions. 2018-10-01 15:25:21 -07:00
0c982d2aa2 Oops, refactor bug. 2018-09-28 22:16:10 -07:00
b7e768a2f8 Rebuild. 2018-09-28 22:15:24 -07:00
63d8b1cd3f Fully working, I think? (with a lot of shims) 2018-09-28 22:15:19 -07:00
678344182b Forward progress on getting nomnom working. 2018-09-28 18:36:36 -07:00
7b127fca61 Slight API tweaks. 2018-09-28 18:35:42 -07:00
258527750c Slightly more robust. 2018-09-28 18:35:17 -07:00
84931a6f0e Fixes for indentation of generated lua code. 2018-09-28 18:34:40 -07:00
3f31b09e74 Updated to the point of actually compiling. 2018-09-26 14:00:05 -07:00
17dfd24864 Added field to remember text methods. 2018-09-26 13:59:50 -07:00
8a8940c9bc Fixes for actions with targets colliding with compiler actions, and lua
keywords as dict keys.
2018-09-26 13:59:31 -07:00
dcff9ecfcf Fix for calling function with non-literal list. 2018-09-26 13:57:13 -07:00
b43432e647 Fixed all syntax errors, got original (non-nomnom) tests passing. 2018-09-26 13:05:47 -07:00
692fae5416 Incremental fixes and more nomnom ports. 2018-09-26 12:45:19 -07:00
28d0792e69 Rebuild. 2018-09-21 00:30:53 -07:00
f2048235f5 Incremental checkin, currently not working, just saving progress. 2018-09-21 00:30:44 -07:00
acd9c2acd4 Fixed breaking bug with compiler not finding the peg file when running the installed version because it
wasn't looking in the full nomsupath.
2018-09-21 00:27:14 -07:00
Bruce Hill
79d4bd5125 Got rid of repr() use and replaced with :as_lua() or :as_nomsu() in as
many places as possible.
2018-09-18 19:49:29 -07:00
Bruce Hill
d11f9bc5d3 Oops, added "$" to ensure keywords with suffixes don't get changed. 2018-09-18 17:42:01 -07:00
Bruce Hill
884368593d Added code for handling lua keywords in as_lua_id(). 2018-09-18 17:40:49 -07:00
Bruce Hill
790b73c52a Fix for as_lua_id() for keywords 2018-09-18 17:28:26 -07:00
Bruce Hill
c1cba45968 Added support for compile actions returning trees, and compiling blocks
into values.
2018-09-17 15:30:24 -07:00
Bruce Hill
e3bf10196a Added support for compile actions returning syntax trees, which will get
recompiled until they produce Lua code.
2018-09-16 17:53:26 -07:00
Bruce Hill
f225a48367 Much better error reporting for compile errors (i.e. not parse errors),
using the pretty_error system.
2018-09-16 17:38:51 -07:00
Bruce Hill
96e5e567cb Working module system. 2018-09-16 16:57:24 -07:00