Commit Graph

88 Commits

Author SHA1 Message Date
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
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
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
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
a69555bc03 Updated version numbers. 2018-07-25 13:49:17 -07:00
Bruce Hill
723eb9e1f1 Added parens around lambdas (% -> %), and removed them from 'result %'
correspondingly.
2018-07-24 13:39:04 -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
6728587dfc Auto-formatted and auto-upgraded everything! 2018-07-20 20:27:27 -07:00
Bruce Hill
24b8649c33 Tweaks to the API for text matching. 2018-07-20 17:56:15 -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
d5cfaa37be Upgrading to version 2.3 (main change: "=" instead of "<-" for
assignment)
2018-07-18 01:28:17 -07:00
Bruce Hill
c7c657d38f Prep work for next big upgrade, including adding a shorthand for
upgrading actions similarly to 'parse % as %'
2018-07-18 01:04:57 -07:00
Bruce Hill
ba639f2bd0 Upgraded core code to latest Nomsu verison. 2018-07-17 23:08:24 -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
be06fc096a Major changes to how versioning and parsing work. This should be a
better path going forward to handling upgrades. Old syntax files will
stick around for compatibility purposes. Old syntax can be parsed into
valid syntax trees via the old syntax (.peg) files, and then old syntax
trees should be valid and can be upgraded via the normal code path. This
change has lots of improvements to Nomsu codegen too.
2018-07-15 19:43:28 -07:00
Bruce Hill
c9ff0ff04b Fixed up some edge cases with parsing and comments. 2018-07-14 14:53:03 -07:00
Bruce Hill
01a4f36398 Minor changes. 2018-07-13 14:30:39 -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
65dc1f2196 Cleaning up metaprogramming a bit and fixing/adding test for recursion
control flow.
2018-06-26 15:53:00 -07:00
Bruce Hill
ad342b63b7 Simplifications/streamlining the Make process, and cleaning up some of
how command line interaction and `use %` work.
2018-06-24 16:11:40 -07:00
Bruce Hill
9f08215dfb Moved console colors from core/ into lib/ 2018-06-23 18:04:23 -07:00
Bruce Hill
247e55059c Fixed incorrect version ordering (was: Syntax.Compiler.Core.Lib, but
should be: Syntax.Core.Compiler.Lib)
2018-06-23 17:29:25 -07:00
Bruce Hill
dbf3de3d8e Added versioning system. 2018-06-23 00:57:39 -07:00
Bruce Hill
86a3219e7f Cleanup of some metaprogramming stuff, as well as adding support for
"package.nomsupath" to search for files in different locations, and
prioritizing use of "luafilesystem" over system calls.
2018-06-21 19:13:47 -07:00
Bruce Hill
d73cbf0aa5 Cleanups. 2018-06-20 15:22:06 -07:00
Bruce Hill
7f98262dfa Minor cleanups 2018-06-18 18:39:25 -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
b12744d831 Some cleanup and fixes. Simplifying a lot of code, and extending the
flexibility of scoping. Redesigned Object system too.
2018-06-14 23:25:34 -07:00
Bruce Hill
49f1eb3d08 Reshuffling some files. 2018-06-14 22:17:37 -07:00
Bruce Hill
82cfd3e54b More streamlining and cleanup. Especially for core/metaprogramming.nom 2018-06-14 21:59:43 -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
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
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
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
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
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
8cb2788e0d Re-added sources. 2018-05-26 15:04:38 -07:00