Commit Graph

38 Commits

Author SHA1 Message Date
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
ea3197aaff Fully working version of (action [foo]: baz) -> ((foo) means: baz)
refactor and misc other changes.
2018-10-30 23:42:36 -07:00
63d8b1cd3f Fully working, I think? (with a lot of shims) 2018-09-28 22:15:19 -07:00
692fae5416 Incremental fixes and more nomnom ports. 2018-09-26 12:45:19 -07:00
Bruce Hill
f8cfdd0f22 Better parsing of strings and handling of non-printable characters and
tabs.
2018-09-15 15:39:57 -07:00
Bruce Hill
e22c35681f Auto-upgraded everything. 2018-09-14 19:17: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
18126da9c5 Auto-upgraded to 3.7 2018-08-30 14:16:18 -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
5ee9bcb7fb Upgraded version to 3.5.5.6, corresponding to Object Oriented changes. 2018-08-28 15:34:45 -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
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
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
ba639f2bd0 Upgraded core code to latest Nomsu verison. 2018-07-17 23:08:24 -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
82cfd3e54b More streamlining and cleanup. Especially for core/metaprogramming.nom 2018-06-14 21:59:43 -07:00
Bruce Hill
7cd512d15e Added alias: "% as number" 2018-06-06 14:19:54 -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
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
Bruce Hill
2e345e271f Misc changes, fixed up Object lib and tests. 2018-05-24 14:57:35 -07:00
Bruce Hill
6f6c4377b2 Initial working version. 2018-05-16 18:13:02 -07:00
Bruce Hill
3ffeaf1f5d Removed "for all"-style iteration and changed "for % from 1 to 10"-style
to "for % in 1 to 10" for consistency.
2018-05-15 20:33:07 -07:00
Bruce Hill
0a95a264e5 Cleaning up comments. 2018-05-15 18:56:00 -07:00
Bruce Hill
4e821308af Overhauling parsing of Blocks (can no longer contain only one statement) 2018-04-25 17:44:24 -07:00
Bruce Hill
5d59d510cd Removing end-of-line ":" and "(..)" for blocks (they just use
indentation now).
2018-04-25 16:31:09 -07:00
Bruce Hill
da33269c30 All tests passing (except object) 2018-04-19 17:23:54 -07:00
Bruce Hill
1334030285 Added 'square root of %' alias. 2018-02-05 15:11:18 -08:00
Bruce Hill
505fec2a61 Restructured the nomsu files to group all the essentials into core/ and
all the optionals into lib/. lib/core.nom and tests/all.nom are no
longer needed now.
2018-02-02 15:49:42 -08:00