Commit Graph

209 Commits

Author SHA1 Message Date
5027bd4f0f Upgraded/autoformatted. 2018-11-26 16:28:06 -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
34a3dd22a4 Added 'an' alias for things. 2018-11-12 14:25:11 -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
ba03cb67c3 Added shebang and descriptive comment. 2018-11-11 15:37:57 -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
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
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
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
b43432e647 Fixed all syntax errors, got original (non-nomnom) tests passing. 2018-09-26 13:05:47 -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
d11f9bc5d3 Oops, added "$" to ensure keywords with suffixes don't get changed. 2018-09-18 17:42:01 -07:00
Bruce Hill
96e5e567cb Working module system. 2018-09-16 16:57:24 -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
Bruce Hill
7c6047254e Upgraded to 3.8 (text method changes) and fixed some bugs in
tree_to_nomsu.
2018-09-10 16:26:27 -07:00
Bruce Hill
a35d010dfe Removed the mandatory "_" prefix for Nomsu variables, renamed "list" and
"dict" to "List" and "Dict", or in Nomsu's environment, "_List" and
"_Dict", removed uuid.lua and replaced it with core/id.nom for handling
IDs.
2018-09-06 12:48:16 -07:00
Bruce Hill
e1bc075bb5 Removing the "A_" prefix on action names, and improving the quality of
as_lua_id() (guaranteed injectivity).
2018-08-31 15:22:32 -07:00
Bruce Hill
18126da9c5 Auto-upgraded to 3.7 2018-08-30 14:16:18 -07:00
Bruce Hill
4f30e02acb Handling more compatibility stuff, including Lua 5.4, and a backup for
if openssl module is not found, and moving containers (List/Dict) into
their own file, as well as bit operators (and support for __bxor, etc.
metamethods in Lua 5.2/LuaJIT)
2018-08-29 19:39:15 -07:00
Bruce Hill
811fdd6856 Tweaked version 3.6 to include deprecating list append/removal functions
in favor of using a method call style.
2018-08-29 16:00:04 -07:00
Bruce Hill
dcb5e8add2 Fully updated to 3.6, deprecated old LuaCode global functions like "to 1
write 2" and replaced them with method calls like "1::append 2"
2018-08-29 15:10:27 -07:00
Bruce Hill
e64632be1a Switched "as_lua_id" to not add an underscore by default, and just add
it manually to variables and A_ as a prefix to actions. Now, by default,
classes and method calls don't use the A_ prefix, which means nomsu can
more easily play nice with regular Lua objects.
2018-08-29 14:20:18 -07:00
Bruce Hill
5ee9bcb7fb Upgraded version to 3.5.5.6, corresponding to Object Oriented changes. 2018-08-28 15:34:45 -07:00
Bruce Hill
e44acbf338 Lots of overhaul, supporting a new Object Oriented approach (e.g.
%obj::action 1 2) and syntax.
2018-08-28 15:08:07 -07:00
Bruce Hill
930d522fbc Bunch of miscellaneous changes. Paved the way a little bit for having
different compiler domains.
2018-08-27 13:39:22 -07:00
Bruce Hill
c6a7b0be9e Added compatibility for 2.5.5.5 (file hash changes). 2018-07-30 19:39:32 -07:00
Bruce Hill
56143adf97 Updated lib version (for training_wheels and base64). 2018-07-30 19:12:16 -07:00
Bruce Hill
445b3d5b5d Updated training wheels (much overdue). 2018-07-30 19:11:12 -07:00
Bruce Hill
ab4ebdf175 Changed autoformatting rules to ensure tests get clumped together with
the thing below them.
2018-07-30 15:06:03 -07:00
Bruce Hill
2a12310b25 Switching hashes to use base64 instead of hex. 2018-07-30 14:11:45 -07:00
Bruce Hill
a69555bc03 Updated version numbers. 2018-07-25 13:49:17 -07:00
Bruce Hill
b6c99c56a1 Updated package.nomsupath behavior to first search the installed
locations, *then* search the current directory. This makes the system `nomsu` run
properly, even if the local directory has a broken file that has the
same name as a nomsu file.
2018-07-24 15:09:55 -07:00
Bruce Hill
3cf97066be Cleaning up code to make use of newer API. 2018-07-24 14:07:25 -07:00
Bruce Hill
09d797eddc Updating code to latest version. 2018-07-23 15:25:03 -07:00
Bruce Hill
6e5d551071 Run 'use "core"' by default before running anything else, unless --no-core command line flag is used. 2018-07-23 14:54:05 -07:00
Bruce Hill
470a6fe7f9 Fixed blocks starting with extra newline when they start with a comment. 2018-07-23 14:41:30 -07:00
Bruce Hill
4c1f0aca7a Moving all the rest of the tests over to inline versions. 2018-07-22 16:30:49 -07:00
Bruce Hill
addac10a47 Re-autoformatted everything. The main changes are: no longer adding a
newline after 1-line indented code inside blocks, and forcing files to
have a trailing newline. The trailing newline thing created a lot of
spurious changes.
2018-07-22 15:01:05 -07:00
Bruce Hill
dfd39f0b14 Shifting further towards having inline tests. Also added a helper
function for directly extracting source lines from a Source or AST.
2018-07-22 13:59:08 -07:00
Bruce Hill
ae4670bd8e Improvements working towards better inline tests. Improved handling of
file spoofing and adding -e command line flag for executing a string.
2018-07-21 14:44:26 -07:00