Bruce Hill
0563571625
Overhaul of indentations. Now strictly requiring exactly 4 spaces
...
everywhere, and supporting indented string interpolations.
2018-01-30 15:11:18 -08:00
Bruce Hill
90c56d3135
Added a ton of tests for virtually all the functionality. Helped me find
...
and fix a lot of latent problems.
2018-01-26 20:20:38 -08:00
Bruce Hill
214b3f9186
Removed nomsu:write() and nomsu:writeln() and replaced with just plain
...
ol' print()
2018-01-26 15:02:32 -08:00
Bruce Hill
c79bea4401
Overhaul of compiling API (eliminated some of the expr/statements
...
helpers and forced the use of {expr=..., locals=...}-type syntax. This
helped fix up all of the cases like loops where locals were being
mishandled and led to some cleaner code.
2018-01-25 17:36:05 -08:00
Bruce Hill
f769351556
Updated and improve syntax for some stuff. Also added string indexing
...
like in python, including slices.
2018-01-24 13:13:26 -08:00
Bruce Hill
a33cb2598f
Cleaned up code duplication in 'compile % to %' and 'compile % to code
...
%' and improved generated lua output for the common case (a text value).
2018-01-24 01:38:55 -08:00
Bruce Hill
49f0e95571
Prevented redeclaration of function arguments as locals.
2018-01-23 19:29:11 -08:00
Bruce Hill
6d11354b3f
Added implicit local declarations and new syntax of %var <- %value.
2018-01-23 19:22:45 -08:00
Bruce Hill
376dd65278
Updated and fixed up how_do_i
2018-01-19 18:13:13 -08:00
Bruce Hill
c1ac0635fd
Refactored syntax a bit so that ":" isn't necessary for a block, and can
...
be used for inline expressions instead. Also, dict literals now use ":" instead
of "=".
2018-01-19 17:30:39 -08:00
Bruce Hill
f91d06d9fa
Initial commit of object oriented classes.
2018-01-18 01:49:27 -08:00
Bruce Hill
5a526675db
Better usage of ACTION_METADATA and deprecating nomsu.defs.
2018-01-12 19:28:19 -08:00
Bruce Hill
90c72074db
Renamed replaced_vars() to be more descriptive.
2018-01-12 16:45:49 -08:00
Bruce Hill
6b09187899
Switched to use load() with environment table instead of passing in
...
nomsu to everything. This has some nice code cleanliness benefits.
2018-01-12 16:33:11 -08:00
Bruce Hill
e09f05a50c
Reshuffled all the library code into files that make more sense and
...
cleaned up some of the library code.
2018-01-11 18:51:21 -08:00
Bruce Hill
8c1da9a6c3
Purged references to "macro" and replaced with "compile action" or
...
"compile-time action".
2018-01-11 02:07:37 -08:00
Bruce Hill
199161a438
Renamed def->define_action and defmacro->define_macro
2018-01-11 01:57:52 -08:00
Bruce Hill
82cc997ddf
Renamed rule % = % to action % %
2018-01-11 01:19:03 -08:00
Bruce Hill
c0333ca315
Overhaul of error reporting and removing nomsu:call(stub, line_no, ...) in favor of nomsu.defs[stub].fn(...)
2018-01-11 01:04:17 -08:00
Bruce Hill
53a9d4eae8
Pretty much mostly working.
2018-01-10 20:45:03 -08:00
Bruce Hill
421abe1a6f
Cleaned up metaprogramming to go "compile to" -> "rule =" -> "parse as".
...
This speeds things up a bit, and is more intuitive.
2018-01-09 14:59:06 -08:00
Bruce Hill
f97ab858ed
Modernized the codebase a bit to include "immediately:" for immediately
...
running code before further parsing takes place. That means that in the
default case, whole files can be run at once, which makes all but the
weirdest edge cases make a lot more sense and operate smoothly.
2018-01-08 18:53:57 -08:00
Bruce Hill
139bd76efc
Cleaning up vars.XX use and removing typecheck.
2018-01-05 15:42:06 -08:00
Bruce Hill
cd4196d365
Tidying.
2018-01-03 01:04:21 -08:00
Bruce Hill
cfee75b21b
Reworked {} a bit and added dicts to the core language. Did some more
...
testing on string interpolations too.
2018-01-03 00:52:01 -08:00
Bruce Hill
4789892824
Got everything mostly working.
2017-12-30 14:31:07 -08:00
Bruce Hill
3c303018bb
Tweaks.
2017-12-15 15:30:05 -08:00
Bruce Hill
536a3ba649
Got it working.
2017-12-13 16:29:15 -08:00
Bruce Hill
0c1c406ce0
More updates with more functional macros and source code storage.
2017-12-11 17:53:23 -08:00
Bruce Hill
96441251c4
Pretty much everything is working??
2017-12-09 15:34:52 -08:00
Bruce Hill
5903820699
Incremental progress towards working.
2017-12-04 17:54:52 -08:00
Bruce Hill
3ae1f696aa
Fixed remove rule rule.
2017-11-01 20:00:52 -07:00
Bruce Hill
87b2cce8e5
Added remove rule rule.
2017-11-01 19:59:44 -07:00
Bruce Hill
6ba79a8ff1
Added support for serializing rules.
2017-10-31 16:19:08 -07:00
Bruce Hill
60a85bbd8b
Removed some unnecessary semicolons on keywords.
2017-10-23 16:28:45 -07:00
Bruce Hill
ca5896b7bd
Finally fixed the bullshit way that string literals were converted to lua.
2017-10-19 18:16:15 -07:00
Bruce Hill
b98059261c
Abbreviated "lua code" to "lua>" and "lua expr" to "=lua" and "lua
...
block" to "lua do>"
2017-10-19 17:00:10 -07:00
Bruce Hill
e476bfea52
Improved code generation for "when" statements using elseif, and
...
improved code generation for loops by omitting goto labels when not used.
2017-10-13 18:09:04 -07:00
Bruce Hill
7435b61380
Changed generated code to be less verbose for function and macro defs
...
(using "foo %" syntax instead of {type="FunctionCall", ...} literals).
2017-10-13 16:10:47 -07:00
Bruce Hill
782383975c
Added type of alias.
2017-10-09 19:52:46 -07:00
Bruce Hill
88add732c7
Added type function.
2017-10-09 19:51:55 -07:00
Bruce Hill
529afd465f
Fixed permissions to work better with aliases.
2017-10-08 15:06:05 -07:00
Bruce Hill
63ed265157
More progress towards making everything work.
2017-10-02 19:00:58 -07:00
Bruce Hill
dcd3391b36
Updated to undo some of the block/thunk stuff. Thunks are thunks, and
...
expressions can be grouped with parens, and they have a clear
distinction.
2017-10-02 17:21:22 -07:00
Bruce Hill
e2bbbfe161
More stuff is working more better.
2017-09-29 22:04:03 -07:00
Bruce Hill
723a4c3871
Fixed some of secrets' functionality by rewriting rule % = %
2017-09-28 18:25:50 -07:00
Bruce Hill
ac25e20b9f
Kinda mostly working, except for closure vars like in lib/secrets.nom.
2017-09-28 17:49:15 -07:00
Bruce Hill
10d61df78b
Making forward progress.
2017-09-26 15:27:01 -07:00
Bruce Hill
02def0af92
lib/metaprogramming.nom is working!
2017-09-25 17:02:00 -07:00
Bruce Hill
af3274ca92
massive overhaul, compiler kinda works.
2017-09-24 20:20:27 -07:00