Commit Graph

181 Commits

Author SHA1 Message Date
a7d912a33a Initial pass on updating syntax. 2018-12-18 19:30:12 -08:00
d3905474c9 Removed EOL comments 2018-12-14 20:54:18 -08:00
d30f6a397d Fixed some bugs, including upgrade --upgrade-from=version not working.
Also updated the README.
2018-12-14 20:34:49 -08:00
4fe63f253f Auto-updated to version 5 2018-12-14 20:21:03 -08:00
83a40b7493 Updating to support multiple method calls. 2018-12-14 19:25:03 -08:00
6ba84a0f50 Initial setup work for syntax version 5. 2018-12-14 17:49:46 -08:00
0d88091f8d Cleanups and codegen improvements/fixes. 2018-12-13 15:21:55 -08:00
efd743591e Renamed append/concat_append to add/concat_add for Code objects. 2018-11-29 14:57:56 -08:00
5027bd4f0f Upgraded/autoformatted. 2018-11-26 16:28:06 -08:00
8e5f1b9e1e Simplifying the control flow API and deduplicating the code. 2018-11-26 16:22:04 -08:00
0b082397bb Fixed typo. 2018-11-23 15:32:53 -08:00
fa967247da Fixed tests to work better with different syntax versions. 2018-11-21 13:56:25 -08:00
2bbc035f5d Simplifying the filesystem code (no longer entangled with nomsupath) and
using that to simplify the tools. Now the tools directly take lists of
file paths rather than things that might go through nomsupath or
directories or get processed by filetype. Use your shell for globbing stuff like
`nomsu tools/test.nom core/*.nom`
2018-11-20 14:54:40 -08:00
f304138530 Deduplicated goto label syntax (now just use (--- (label) ---)) 2018-11-19 17:44:46 -08:00
a89d69e843 Autoformatted/auto-upgraded. 2018-11-19 17:37:37 -08:00
acd1191fb0 Tweaks and API cleanup. 2018-11-19 17:21:17 -08:00
7f47d42040 In-progress (but working) overhaul of some elements including: function
calls, lib/thing.nom API, multi-assignments, varargs, etc.
2018-11-17 14:39:08 -08:00
a84242b849 Cleaning up say/print and io.write (now you can use (say "foo" inline)) 2018-11-11 19:01:31 -08:00
2b4196bc20 Added (% as hex) and fixed bug with text interpolation codegen not
adding parens around indexchains.
2018-11-11 18:53:06 -08:00
81fda96301 Updated to use 'set' syntax instead of ": yes" 2018-11-11 16:45:48 -08:00
9d82d522c1 Fixed some autoformatting stuff, and prepping to deprecate some math
shorthand.
2018-11-11 16:27:01 -08:00
4efe44ed27 Fully upgraded to 4.10.12.7, including deprecating the old list/dict
comprehension methods, in favor of the new native support.
2018-11-11 15:50:46 -08:00
33d44fa8fc Style tweak: using (retry) instead of %retry for goto label. 2018-11-11 15:29:59 -08:00
aa2902256f Removing compile-error shim. 2018-11-11 15:27:55 -08:00
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
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
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
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
7a35e38d87 Renamed (action %) -> (%'s meaning) 2018-10-31 15:05:17 -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
23abab4f80 Some cleanups and fixes, made the parser more permissive of prematurely
terminated files.
2018-10-29 13:00:30 -07:00
0c982d2aa2 Oops, refactor bug. 2018-09-28 22:16:10 -07:00
63d8b1cd3f Fully working, I think? (with a lot of shims) 2018-09-28 22:15:19 -07:00
84931a6f0e Fixes for indentation of generated lua code. 2018-09-28 18:34:40 -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
f2048235f5 Incremental checkin, currently not working, just saving progress. 2018-09-21 00:30:44 -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
c1cba45968 Added support for compile actions returning trees, and compiling blocks
into values.
2018-09-17 15:30:24 -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
Bruce Hill
2282085e13 Initial working version. 2018-09-15 20:20:46 -07:00
Bruce Hill
f8cfdd0f22 Better parsing of strings and handling of non-printable characters and
tabs.
2018-09-15 15:39:57 -07:00
Bruce Hill
e22c35681f Auto-upgraded everything. 2018-09-14 19:17:16 -07:00
Bruce Hill
9e10c8bf00 Removing dead code and string.as_lua_id() (now just set on string
metametatable)
2018-09-10 16:37:16 -07:00