cac9b2139f
Added some helper methods, including first() and last().
2019-03-09 15:52:35 -08:00
e6d53864f7
Removed debug code.
2019-01-15 18:08:23 -08:00
0f0fb2256a
Major overhaul of how modules and environments work, along with some
...
steamlining and tweaks to the makefile. Version bump: 6.14.13.8
2019-01-10 16:35:08 -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
ec69ee6f62
Fixes for: indented strings ending in ", peeking at code object text
...
before modifying them, and major upgrades to the nomsu codegen,
including support for indented inline arguments (instead of using
"\n..") and just generally better line wrapping, including finally good
rules for when to use indented text (for almost all cases).
2018-12-30 23:58:43 -08:00
efd743591e
Renamed append/concat_append to add/concat_add for Code objects.
2018-11-29 14:57:56 -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
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
63d8b1cd3f
Fully working, I think? (with a lot of shims)
2018-09-28 22:15:19 -07:00
258527750c
Slightly more robust.
2018-09-28 18:35:17 -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
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
23b52bc22d
Intermediate step in upgrading to 3.6. Fixed a bug with upgrading
...
methods.
2018-08-29 15:03:03 -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
3d7842ef73
Deduplicating code a bit.
2018-07-23 15:24:52 -07:00
Bruce Hill
c4be74a5d3
Simplifying and correcting the nomsu codegen.
2018-07-20 17:51:33 -07:00
Bruce Hill
9d6627aee5
Hopefully last correctness fix for trailing_line_len(), now it's just
...
dumb and slow, but correct. Also simplified recursion options a bit for
tree_to_nomsu()
2018-07-19 21:10:19 -07:00
Bruce Hill
47db74229d
Fixed some bugs in trailing_line_len() and refactored tree_to_nomsu into
...
separate inline/not-inline functions.
2018-07-19 20:42:09 -07:00
Bruce Hill
bf67a61013
Updating to version 2.4.4.3, with new syntax for multi-statement 'if'
...
and switch statements.
2018-07-18 17:56:15 -07:00
Bruce Hill
cbd1437752
Optimization/simplification pass.
2018-07-17 16:13:55 -07:00
Bruce Hill
39a0121856
Improvements to nomsu codegen.
2018-07-17 15:01:04 -07:00
Bruce Hill
0442c8dd21
Overhaul of comment handling, plus a few fixes (e.g. a fix for indented
...
text that begins with a nomsu comment)
2018-07-17 14:12:51 -07:00
Bruce Hill
01a4f36398
Minor changes.
2018-07-13 14:30:39 -07:00
Bruce Hill
0fd3d1f2b9
Fixing up comments, slowly.
2018-07-12 21:42:16 -07:00
Bruce Hill
194146d365
Improving codegen line wrapping.
2018-07-10 17:34:50 -07:00
Bruce Hill
3fd5687370
Fixed up line numbers for generated code.
2018-07-10 17:10:59 -07:00
Bruce Hill
fa72d7eeb1
Fixing up error reporting and ripping out LDT-specific code (now a
...
debugger can
be provided by a command line flag)
2018-07-10 15:00:35 -07:00
Bruce Hill
0923b0192c
Improvements to nomsu codegen (comments are now retained) and some
...
improvements to handling of stdin and fixes for error reporting.
2018-06-28 14:13:01 -07:00
Bruce Hill
65dc1f2196
Cleaning up metaprogramming a bit and fixing/adding test for recursion
...
control flow.
2018-06-26 15:53:00 -07:00
Bruce Hill
d7d86e0268
Lots of cleanup.
2018-06-19 00:44:22 -07:00
Bruce Hill
f83cc3ad8a
More streamlining and cleanup.
2018-06-18 18:11:09 -07:00
Bruce Hill
16d127abb5
Initial working version.
2018-06-18 15:44:35 -07:00
Bruce Hill
82cfd3e54b
More streamlining and cleanup. Especially for core/metaprogramming.nom
2018-06-14 21:59:43 -07:00
Bruce Hill
63a19db0dc
Working version.
2018-06-12 20:06:37 -07:00
Bruce Hill
3c510e4ee5
Lots of optimizations and simplifications, especially towards getting
...
better performance on luajit.
2018-06-12 18:04:41 -07:00
Bruce Hill
b5fb8933af
Removed dependency on 'immutable' library. This lets LuaJIT do more
...
aggressive optimizations and generally helps performance. Some safety is
lost, but I think the performance gains, reduced complexity, and reduced
dependencies are worth it.
2018-06-12 15:14:07 -07:00
Bruce Hill
36b0c3dcf9
Updating documentation.
2018-06-05 03:39:50 -07:00
Bruce Hill
83183122f1
Optimizations and cleanup. Build script now fails on first error and
...
uses the precompiled versions it has just compiled.
2018-06-04 20:44:58 -07:00
Bruce Hill
b53516c47c
Simplified and correctified lib/object (though the codegen still need
...
streamlining), added a .stub member to Action trees, and switched
Source's repr to be @filename[start:stop] instead of
"filename[start:stop]"
2018-05-30 17:21:19 -07:00
Bruce Hill
624fcdcc7e
Moved as_lua_id() onto 'string'
2018-05-30 13:46:54 -07:00
Bruce Hill
3573dfe995
Almost-working reimplementation of source code mapping.
2018-05-29 16:15:10 -07:00
Bruce Hill
e17822d1e5
Cleaned up some asserts for performance.
2018-05-29 11:14:07 -07:00
Bruce Hill
2e15c0fd50
Some tweaks/cleanup on the nomsu code as well as adding variable
...
mangling to 'parse % as %' to make almost hygienic macros.
2018-05-27 18:29:23 -07:00
Bruce Hill
0c7c06beab
Moving back to capturing tables in LPEG and everything is a Source, not
...
string.
2018-05-26 15:59:03 -07:00
Bruce Hill
8cb2788e0d
Re-added sources.
2018-05-26 15:04:38 -07:00