Bruce Hill
6021f04490
Fix for lua parsing of long strings/table literals.
2018-01-18 16:44:32 -08:00
Bruce Hill
f91d06d9fa
Initial commit of object oriented classes.
2018-01-18 01:49:27 -08:00
Bruce Hill
12cc294c7a
Fixed some minor bugs that made generated nomsu uglier.
2018-01-17 16:45:29 -08:00
Bruce Hill
8bbebb8735
Completely fixed/reworked tree_to_nomsu, and it's okay right now.
2018-01-17 16:37:27 -08:00
64865aa596
Added compile step for lib/core.nom
2018-01-16 01:45:43 -08:00
4c059a7f9b
Removed unnecessary semicolons that broke luajit.
2018-01-16 01:44:50 -08:00
Bruce Hill
d82c4f85d8
Added support for translating comments instead of dropping them.
2018-01-15 15:50:32 -08:00
Bruce Hill
5a526675db
Better usage of ACTION_METADATA and deprecating nomsu.defs.
2018-01-12 19:28:19 -08:00
Bruce Hill
268a636157
Optimized loops to use local vars in loop definitions when possible.
2018-01-12 17:08:05 -08:00
Bruce Hill
b5ae7dac51
Added indent action
2018-01-12 17:07:35 -08:00
Bruce Hill
90c72074db
Renamed replaced_vars() to be more descriptive.
2018-01-12 16:45:49 -08:00
Bruce Hill
b4a0267f71
Making change for auto-adding recompiled nomsu.lua to commits.
2018-01-12 16:41:30 -08:00
Bruce Hill
28badba29a
Deleted some dead code.
2018-01-12 16:34:46 -08:00
Bruce Hill
4b6d35aa9f
Rebuild.
2018-01-12 16:33:42 -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
06bf76f818
Truncated debug output for readability.
2018-01-11 18:48:43 -08:00
Bruce Hill
48b27d4b1a
Fixed an error in the peg for dicts.
2018-01-11 18:48:12 -08:00
Bruce Hill
425f4ed7a7
Added todo.
2018-01-11 15:34:54 -08:00
Bruce Hill
7251f75087
Added "local %" macro as a stopgap for locals.
2018-01-11 15:32:54 -08:00
Bruce Hill
1e0dc6e477
Moved text utilities into their own file.
2018-01-11 15:27:15 -08:00
Bruce Hill
60aa3f5fcf
Fixed ipairs->pairs to make dict iteration work.
2018-01-11 15:26:51 -08:00
Bruce Hill
ba87104202
Fixed require->use, updated TODO.
2018-01-11 14:07:14 -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
1c6b660d6b
Updated TODO
2018-01-11 02:10:23 -08:00
Bruce Hill
c575ad1041
Rebuilt.
2018-01-11 02:08:41 -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
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
09b64e0341
Performance optimizations and correctness fix for [=[...]=]-style
...
strings. Also, require % now properly inserts lua code.
2018-01-10 16:22:45 -08:00
Bruce Hill
ea05cc155e
Switched back to using precompiled lua files instead of lua> "..",
...
because it's noticeably faster.
2018-01-10 13:52:41 -08:00
Bruce Hill
787c7c5a6c
Propagating filename
2018-01-09 16:30:29 -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
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
a4c8e5ce65
Removed semicolons and compound statements, added support for (foo: a b)
...
style syntax for thunks that continue till the end of paren groups.
2018-01-07 16:47:14 -08:00
Bruce Hill
2df539a762
More cleanup of vars.XX -> \%XX
2018-01-05 15:45:46 -08:00
Bruce Hill
139bd76efc
Cleaning up vars.XX use and removing typecheck.
2018-01-05 15:42:06 -08:00
Bruce Hill
87b93f4aba
Added nomsu:assert()
2018-01-05 15:23:18 -08:00
Bruce Hill
de668ce174
Low hanging optimization fruit.
2018-01-05 14:56:35 -08:00
Bruce Hill
8cc1262504
Updated examples and made operator characters not stick to each other.
...
Useful for <%x>=6 properly registering as <%x> = 6.
2018-01-03 19:26:41 -08:00
Bruce Hill
b2ddc1d768
Added support for \000 and \x00 style byte literals.
2018-01-03 17:23:46 -08:00