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
30639f52e1
Added "export" for explicitly non-local variables.
2018-01-23 19:42:14 -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
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
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
7251f75087
Added "local %" macro as a stopgap for locals.
2018-01-11 15:32:54 -08:00
Bruce Hill
3fbc89273d
Removed some dead code and streamlined the API a bit. Also added
...
training wheels for ease of transitions.
2018-01-11 04:38:46 -08:00
Bruce Hill
756c1f718e
Renamed "require %" to "use %"
2018-01-11 03:35:35 -08:00
Bruce Hill
9d8c701441
Added "%'s id" to use UUIDs and changed "% = %" to "set % = %" and some
...
other misc.
2018-01-11 03:32:12 -08:00
Bruce Hill
bfe66a70e6
Renamed "% mod %" to "wrap % around %"
2018-01-11 02:18:09 -08:00
Bruce Hill
6f4b67632a
Renamed String -> Text
2018-01-11 01:09:26 -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
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
568a44ef19
Reworking some stuff so that functions only allow expressions to be
...
return values with either an explicit "return" statement or if they're
the only line in the function, and the line is an expression.
2018-01-07 18:45:27 -08:00
Bruce Hill
c92e5fbc81
Some overhaul of binary operators so that arbitrary math patterns work
...
fine.
2018-01-07 18:03:37 -08:00
Bruce Hill
b1c6354464
Added substring operator %x|start - stop|
2018-01-07 16:51:29 -08:00
Bruce Hill
2df539a762
More cleanup of vars.XX -> \%XX
2018-01-05 15:45:46 -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
536a3ba649
Got it working.
2017-12-13 16:29:15 -08:00
Bruce Hill
60a85bbd8b
Removed some unnecessary semicolons on keywords.
2017-10-23 16:28:45 -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
9dee9dbbd8
Made symbols group with each other, instead of *every* one being alone.
2017-10-13 19:43:55 -07:00
Bruce Hill
bccfe9d8e1
Changed tokenizing to treat symbols as their own things.
2017-10-13 19:41:58 -07:00
Bruce Hill
b11d0752db
Added ternary unless.
2017-10-05 15:20:20 -07:00
Bruce Hill
4ae64ef9e3
Fixed ternary operator.
2017-10-05 15:00:01 -07:00
Bruce Hill
9251b462da
Fixed one compiler bug with comments immediately after indenting
2017-10-02 20:17:52 -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
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
af3274ca92
massive overhaul, compiler kinda works.
2017-09-24 20:20:27 -07:00
Bruce Hill
e4660b169c
Renamed compiler -> nomsu for concision and clarity.
2017-09-22 11:56:46 -07:00
Bruce Hill
6882862d0f
Cleaned up code generation to have less cruft.
2017-09-22 11:44:07 -07:00
Bruce Hill
e478b33d7a
Tidying up.
2017-09-21 14:13:24 -07:00
Bruce Hill
4fd6b61a00
Fixed bug that caused files to get reloaded if they returned nil.
2017-09-21 14:11:34 -07:00
Bruce Hill
5f2db8da0e
Everything fixed up and some reduced lua codespew too!
2017-09-21 02:33:04 -07:00
Bruce Hill
3715481506
Another overhaul, this time pulling all the chunks of the core lib into
...
their own files.
2017-09-21 00:10:26 -07:00