Commit Graph

445 Commits

Author SHA1 Message Date
Bruce Hill
12d52f743c Simplifying code. 2018-06-13 13:23:39 -07:00
Bruce Hill
45e0a831fe Much improved code formatting for tree_to_nomsu 2018-06-12 23:47:54 -07:00
Bruce Hill
968b5da150 Fixed some bugs. 2018-06-12 20:15:56 -07:00
Bruce Hill
63a19db0dc Working version. 2018-06-12 20:06:37 -07:00
Bruce Hill
b0997a7dbf Minor optimizations to indent/dedent/nodent. 2018-06-12 18:16:44 -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
0c9973ff03 Tidying up exceptions and error reporting. Also simplified the grammar a
tiny bit.
2018-06-12 13:56:35 -07:00
Bruce Hill
7cd512d15e Added alias: "% as number" 2018-06-06 14:19:54 -07:00
Bruce Hill
810ae220bc Added list/dict metatables to make comparison and string representations
simpler. Also deleted Counters.
2018-06-06 13:25:34 -07:00
Bruce Hill
2d88c68d71 Fixed piping in file. 2018-06-05 16:44:43 -07:00
Bruce Hill
42632e01b2 Updating how_do_i 2018-06-05 16:42:13 -07:00
Bruce Hill
5dfdcb39a6 Fixed indentation detection for indented text with leading whitespace. 2018-06-05 16:38:18 -07:00
Bruce Hill
36b0c3dcf9 Updating documentation. 2018-06-05 03:39:50 -07:00
Bruce Hill
e22e107390 Minor tidying. 2018-06-04 23:02:13 -07:00
Bruce Hill
08e590ac57 Much better reporting for compile-time errors (now includes source and
line number again)
2018-06-04 22:54:08 -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
563e415e07 Switched from Node(Tuple(values...), source) to Node(source, values...),
thanks to support from immutable-tables for mixed tables.
2018-06-04 17:57:07 -07:00
Bruce Hill
e7bdc35aa8 Cleanups to try/catch logic and object logic. 2018-06-04 17:23:13 -07:00
Bruce Hill
7cd4f276b7 Added todo 2018-05-30 17:27:10 -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
5637676bc4 Dead code cleanup 2018-05-30 14:29:15 -07:00
Bruce Hill
b3df63eb10 Added 'for (%k,%v) in ...' alias for 'for %k = %v in ...' 2018-05-30 14:08:30 -07:00
Bruce Hill
624fcdcc7e Moved as_lua_id() onto 'string' 2018-05-30 13:46:54 -07:00
Bruce Hill
0afcb416bc Microoptimization 2018-05-30 13:41:21 -07:00
Bruce Hill
aeceba800b Deleted shebang rule. Comments handle it just fine. 2018-05-30 13:11:05 -07:00
Bruce Hill
f9229c5e91 Better parse error reporting. 2018-05-30 13:07:15 -07:00
Bruce Hill
e5d9879a79 Cleaned up patterns a little. 2018-05-30 12:07:08 -07:00
Bruce Hill
a01e7d27bd Removed ldt shim 2018-05-29 19:23:34 -07:00
Bruce Hill
21e3a7b375 More improvements to error reporting. 2018-05-29 19:10:11 -07:00
Bruce Hill
8806d7639e Cleaned and fixed up colored console text output for error messages. 2018-05-29 18:11:04 -07:00
Bruce Hill
e697689ddd Fixed up the edge cases and simplified the code a bit. 2018-05-29 17:10: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
b6be516e3f Fix for luajit, though I'm not sure why it worked for lua either. 2018-05-28 23:24:43 -07:00
Bruce Hill
66fa60100e Trivially added support for foo(1,2) as sugar for foo 1 2 2018-05-27 18:36:15 -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
6ce32bdd25 Cleaned up lpeg matching stuff to use lpeg.Carg(1) instead of
lpeg.userdata, and switched indent/dedent/nodent to use a number to
track indentation instead of a stack.
2018-05-26 19:25:17 -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
Bruce Hill
0b4a81191a Minor tidying. 2018-05-26 13:09:25 -07:00
Bruce Hill
64294f5cd6 Removed the Word tree type and replaced it with raw strings, since
they're only used as part of Actions
2018-05-24 21:17:15 -07:00
Bruce Hill
d9b795ee45 Adding some src map building code. 2018-05-24 20:27:26 -07:00
Bruce Hill
446892d11e Consolidating code obj code and expunging all [[..]]-style lua strings. 2018-05-24 16:13:46 -07:00
Bruce Hill
0c07968e07 Added error checking for bad paths. 2018-05-24 15:51:16 -07:00
Bruce Hill
5758626bf7 Cleaned up string quotes 2018-05-24 15:36:10 -07:00
Bruce Hill
ba76a35e84 Fixed up file hash lib. 2018-05-24 15:33:12 -07:00
Bruce Hill
2e345e271f Misc changes, fixed up Object lib and tests. 2018-05-24 14:57:35 -07:00
Bruce Hill
ad94ed3653 Moved all the tree->lua and tree->nomsu code back into single functions
in nomsu.moon, and cleaned up how Vars are treated, since they are not
atomic.
2018-05-16 19:08:59 -07:00
Bruce Hill
6f6c4377b2 Initial working version. 2018-05-16 18:13:02 -07:00