Commit Graph

372 Commits

Author SHA1 Message Date
Bruce Hill
35a5539185 Fix for math expression parsing 2018-04-30 14:50:43 -07:00
Bruce Hill
bf24824660 Improving idiomatic nomsu codegen 2018-04-28 20:45:27 -07:00
Bruce Hill
85c5511fa5 Fixed compile_lib and cleaned up control_flow 2018-04-28 19:38:03 -07:00
Bruce Hill
05528c50ec Further improvements on the CLI. 2018-04-28 19:16:54 -07:00
Bruce Hill
3a049c15df Improvements to command line file handling. 2018-04-28 18:07:22 -07:00
Bruce Hill
df9a82a971 Overhaul of command-line API. It's a bit cleaner now. 2018-04-28 17:08:44 -07:00
Bruce Hill
d13a945b5f Removed LFS dependency in favor of just using find 2018-04-28 15:25:31 -07:00
Bruce Hill
23022dc88c Re-added (..), which is necessary for long expressions as first arg to
an action.
2018-04-28 15:21:28 -07:00
Bruce Hill
b54829de36 Better text interpolation/handling of "\". Also added syntax support for
(statement; statement)
2018-04-27 16:45:35 -07:00
Bruce Hill
6fecb5d395 Cleaning up codegen and TODO 2018-04-26 14:04:59 -07:00
Bruce Hill
7f99c70d56 Fixed renaming lua_obj->code_obj 2018-04-26 14:00:15 -07:00
Bruce Hill
4892c63e92 Renamed lua_obj -> code_obj 2018-04-25 17:56:26 -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
50a092e4b5 Got nomsu codegen working again. 2018-04-25 16:04:55 -07:00
Bruce Hill
cb28f52b41 Updated block-style text interpolation to have less redundancy. 2018-04-25 15:37:47 -07:00
Bruce Hill
ec5d730fa0 Switched repr() to only return ""-style strings, and not [[]]-style,
which helps with indenting generated lua code correctly. Also made a few
ergonomic fixes/changes for line breaking.
2018-04-24 20:39:18 -07:00
Bruce Hill
bb31a98a56 Recompiling. 2018-04-24 20:17:24 -07:00
Bruce Hill
bff93d386c Refactor to improve indentation and move as_nomsu() into tree methods. 2018-04-24 20:17:08 -07:00
Bruce Hill
34a2f50ebc Deleted habit breaker. 2018-04-20 17:00:33 -07:00
Bruce Hill
dec5ee8262 Lots of optimizations. 2018-04-20 16:23:59 -07:00
Bruce Hill
14bda2fb2d Cleanups and optimizations. 2018-04-20 14:33:57 -07:00
Bruce Hill
931ae40f40 Fixed compiling to .lua files 2018-04-19 19:43:32 -07:00
Bruce Hill
928e78f252 Updated. 2018-04-19 19:23:19 -07:00
Bruce Hill
310712385b Made Source a little more concise. 2018-04-19 17:38:42 -07:00
Bruce Hill
ecb4341bdc Switched last char check to first char so foo[x] doesn't get mixed up
with [[foo]].
2018-04-19 17:28:02 -07:00
Bruce Hill
da33269c30 All tests passing (except object) 2018-04-19 17:23:54 -07:00
Bruce Hill
dcb380f1f6 More cleanup, slowly working through operators/control_flow 2018-04-18 17:41:57 -07:00
Bruce Hill
ec17442090 Cleaning up. 2018-04-18 15:46:01 -07:00
Bruce Hill
16f3a189fd More working, shifting towards having Lua and Nomsu objects instead of
just strings.
2018-04-18 15:28:59 -07:00
Bruce Hill
b589c23741 Disabled comment transpilation for now. 2018-04-17 14:47:42 -07:00
Bruce Hill
26d0de8299 Partially working, at least for metaprogramming.nom 2018-04-17 14:36:55 -07:00
Bruce Hill
54fc7fc440 Moving tree_to_lua into each of the Nomsu tree types, which are now in
their own file.
2018-04-17 14:19:07 -07:00
Bruce Hill
25e06d1fce Getting closer. 2018-04-13 15:29:20 -07:00
Bruce Hill
8f6f941d89 Added lua_obj.lua 2018-04-13 14:55:28 -07:00
Bruce Hill
222d4d0727 More correct and more working. 2018-04-13 14:54:47 -07:00
Bruce Hill
b05a46c78c Incremental progress. 2018-04-12 20:39:22 -07:00
Bruce Hill
1de29826a8 Incremental progress towards working. 2018-04-12 18:01:59 -07:00
Bruce Hill
17a2bded6a Incremental progress. 2018-04-11 21:07:18 -07:00
Bruce Hill
b9827b1745 Work in progress... 2018-04-11 20:05:18 -07:00
Bruce Hill
ab8ccf4e27 Off by one error. 2018-04-09 19:45:43 -07:00
Bruce Hill
d42d20c50a Re-added callstack callsite info. It's a bit hacky, but better than
nothing.
2018-04-09 18:58:27 -07:00
Bruce Hill
86925c5b3a Patched debug.getinfo to return reasonable info for nomsu functions. 2018-04-08 18:24:11 -07:00
Bruce Hill
618bd47765 Typo caused metadata to go missing. 2018-04-08 18:11:55 -07:00
Bruce Hill
4e51768ebd Improved codegen code. 2018-04-08 16:06:39 -07:00
Bruce Hill
680006b25a Switched to use "." syntax. 2018-04-08 16:01:28 -07:00
Bruce Hill
fd621a1062 Cleaned up LHS of "." operator to avoid adding unnecessary parens so
Lua's parser doesn't get confused by (x).y = 1.
2018-04-08 15:41:55 -07:00
Bruce Hill
a49e97f0e3 Retrofitted "%'s %" to parse as dot syntax. 2018-04-06 16:53:59 -07:00
Bruce Hill
227b944bad Initial working version. 2018-04-06 16:45:57 -07:00
Bruce Hill
9109a090eb Better repr. 2018-03-22 13:56:35 -07:00