Commit Graph

280 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
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
83219f8522 Bumped version number, fixed REPL, and simplified/fixed (use %). 2018-10-31 03:52:00 -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
96e5e567cb Working module system. 2018-09-16 16:57:24 -07:00
Bruce Hill
2282085e13 Initial working version. 2018-09-15 20:20:46 -07:00
Bruce Hill
e22c35681f Auto-upgraded everything. 2018-09-14 19:17:16 -07:00
Bruce Hill
ea310306d7 Initial working version. 2018-09-12 15:32:04 -07:00
Bruce Hill
603c5b1245 Minor fixes/tidying. 2018-09-08 01:06:05 -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
54906c0553 Fix for REPL not getting launched when nomsu -I lib is run. 2018-07-30 14:25:35 -07:00
Bruce Hill
d7e297844c Fixed stdin handling. 2018-07-24 17:36:50 -07:00
Bruce Hill
b1c0446a3c Updating file stuff for better compatibility with Lua 5.2 and fixing
some bugs. Also updated README to provide more compatibility info and
list Lua5.2+ as a requirement.
2018-07-24 16:43:56 -07:00
Bruce Hill
efdfdcd695 Switched to optimization level 1 by default (i.e. use precompiled nomsu
files).
2018-07-24 15:25:31 -07:00
Bruce Hill
b6c99c56a1 Updated package.nomsupath behavior to first search the installed
locations, *then* search the current directory. This makes the system `nomsu` run
properly, even if the local directory has a broken file that has the
same name as a nomsu file.
2018-07-24 15:09:55 -07:00
Bruce Hill
991d9994e9 Recompiled files. 2018-07-23 15:25:53 -07:00
Bruce Hill
6e5d551071 Run 'use "core"' by default before running anything else, unless --no-core command line flag is used. 2018-07-23 14:54:05 -07:00
Bruce Hill
ae4670bd8e Improvements working towards better inline tests. Improved handling of
file spoofing and adding -e command line flag for executing a string.
2018-07-21 14:44:26 -07:00
Bruce Hill
6afa71d678 Removing minor change. 2018-07-17 16:15:50 -07:00
Bruce Hill
cbd1437752 Optimization/simplification pass. 2018-07-17 16:13:55 -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
af62e3e8bf All tests passing. 2018-07-12 21:24:13 -07:00
Bruce Hill
3fd5687370 Fixed up line numbers for generated code. 2018-07-10 17:10:59 -07:00
Bruce Hill
77a551099a Updated doc for debugger. 2018-07-10 15:06:08 -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
cb1c3106f8 Made command line args into a proper Nomsu list. 2018-07-09 17:00:57 -07:00
Bruce Hill
11e9e36636 Simplified the command line interface. 2018-07-09 16:59:20 -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
80c8ceb0d4 Added manpage and fixed a bug that screwed up nomsu loading. 2018-06-24 18:20:28 -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
65addb9aa6 Cleaning up makefile and REPL colors. 2018-06-23 18:26:27 -07:00
Bruce Hill
9f08215dfb Moved console colors from core/ into lib/ 2018-06-23 18:04:23 -07:00
Bruce Hill
863983202c Fixed up nomsupath behavior and refactored file stuff into its own file. 2018-06-23 17:22:43 -07:00
Bruce Hill
dbf3de3d8e Added versioning system. 2018-06-23 00:57:39 -07:00
Bruce Hill
126678f737 Adding fancy makefile that compiles all the moonscript files and
precompiles all the nomsu files and can build a nice executable file and
install it wherever you like.
2018-06-22 02:41:08 -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
c1cec2ac84 Tidying up error handling and REPL. 2018-06-19 15:24:39 -07:00
Bruce Hill
7deed5af41 Fixing up some error reporting 2018-06-19 02:00:59 -07:00
Bruce Hill
59c79bdf57 Split up CLI and NomsuCompiler 2018-06-19 01:27:41 -07:00
Bruce Hill
1c8c84f8d2 Moved error logic into its own file. 2018-06-19 01:12:54 -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
fc71b0331b Fixed some nomsu codegen bugs 2018-06-15 03:30:32 -07:00
Bruce Hill
9d6932a872 Cleaned up/improved the command line interface, and fixed the
REPL/autoformatting.
2018-06-15 03:11:56 -07:00
Bruce Hill
f790caf0ab Removed debug shim. 2018-06-15 00:20:32 -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
82cfd3e54b More streamlining and cleanup. Especially for core/metaprogramming.nom 2018-06-14 21:59:43 -07:00