783eec9b45
Made iteration easier to work with by using .__inext and .__next for
...
custom iteration, and a custom ipairs() and pairs() to use that.
2019-03-13 20:55:59 -07:00
0ba6b3e5f6
Added support for coroutines in constructors, as well as multi-argument
...
constructors.
2019-03-09 15:53:35 -08:00
057f5b74eb
Moving to better, more centralized versioning system. Now the Nomsu
...
version is just defined as a list at the top of nomsu.moon, and uses
X.Y.Z form instead of X.Y.Z.W. Added a ([...], from 2) method and a
([...], up to 5) method, and fixed a few upgrade bugs.
2019-02-06 15:34:00 -08:00
84f3ae76ab
Added inverse dicts and a few new list methods.
2019-02-02 19:32:54 -08:00
b714a55ec0
Added 'reversed' method for lists.
2019-01-30 15:19:43 -08:00
f746ba34d7
Moved all the text method stuff into text.moon instead of splitting
...
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-22 16:16:53 -08:00
ab116d4d8f
Fixed extra return value.
2019-01-18 20:39:16 -08:00
520acd3979
Overhauling OO-API a little to make it more minimalistic.
2019-01-16 21:33:30 -08:00
75bb8979ae
Fixed dict tostring to use {.x = 1} form instead of {x: 1}
2019-01-16 16:44:30 -08:00
b6d3cbd61c
Misc changes, including text indented interpolations are now indented
...
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.
2019-01-01 15:07:10 -08:00
908243ba21
Added comprehension form to containers, e.g. List(function(add) add(5)
...
end)
2018-12-18 17:34:35 -08:00
43ff3892f3
Fixed a string indexing issue.
2018-11-19 17:28:43 -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
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
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
23abab4f80
Some cleanups and fixes, made the parser more permissive of prematurely
...
terminated files.
2018-10-29 13:00:30 -07:00
1a3137a210
Fixed some misnamed functions.
2018-10-01 15:25:21 -07:00
63d8b1cd3f
Fully working, I think? (with a lot of shims)
2018-09-28 22:15:19 -07:00
7b127fca61
Slight API tweaks.
2018-09-28 18:35:42 -07:00
17dfd24864
Added field to remember text methods.
2018-09-26 13:59:50 -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
ea310306d7
Initial working version.
2018-09-12 15:32:04 -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
43e6523fd4
Shifting towards more text methods instead of text global functions.
...
Also fixed a bug with method call parenthesizing.
2018-09-10 15:56:00 -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
7f34b9f5ef
Added safety check to detect non-number keys in lists.
2018-08-30 14:21:33 -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