8719641ace
Added extra newline to output after a multiply-indented region ends.
2019-03-27 14:41:31 -07:00
b44afbf417
Fix for some bad codegen with ((`$x)'s foo)
2019-03-20 16:41:08 -07:00
de1f80fe51
Better codegen and error reporting
2019-03-04 14:26:03 -08:00
9e9bcad6fa
Added underscores for numbers (e.g. 1_000, 0xDEAD_BEEF), and fixed some
...
compatibility and decompiling issues.
2019-02-06 14:31:43 -08:00
72d699fe86
Bunch of changes:
...
- Added shebangs to generated code output
- SyntaxTree:map() -> SyntaxTree:with(), and corresponding changes to
metaprogramming API
- Added (return Lua 1) shorthand for (return (Lua 1))
- (1 and 2 and 3) compile rule mapping to -> (1 and (*extra arguments*))
- Don't scan for errors, just report them when compiling
- Syntax changes:
- Added prefix actions (e.g. #$foo)
- Operator chars now include utf8 chars
- Ditch "escaped nomsu" type (use (\ 1) compile action instead)
2019-02-05 15:47:01 -08:00
1713a0e38f
Fixed untested codepath for generating ($x, (foo; baz))
2019-01-25 15:01:47 -08:00
e9959a570e
Fixed lists/dicts to autoformat with spacer lines when appropriate (same
...
rules as for Blocks)
2019-01-18 14:29:09 -08:00
5c96748802
Fix for formatting indented code with the format tool.
2019-01-15 17:48:35 -08:00
bf37295fae
Updating to v6.15, which includes "external (...)" instead of separate
...
'externally' versions of stuff, and some auto-formatting.
2019-01-15 15:54:28 -08:00
5eb1b276ad
Fixed some bugs with append/add discrepancy, misguided ".." matching for
...
needs_space, and list items getting falsely forced into indented form.
2019-01-14 16:30:12 -08:00
0f0fb2256a
Major overhaul of how modules and environments work, along with some
...
steamlining and tweaks to the makefile. Version bump: 6.14.13.8
2019-01-10 16:35:08 -08:00
80167c9df2
Fix for no-arg functioncalls of expressions (e.g. $fn()), and line
...
wrapping of list/dicts.
2019-01-07 21:40:01 -08:00
3e89092833
Some changes to the error API, a fix for statement block parsing, and
...
replacing ((foo 1 baz)'s meaning) with $(foo 1 baz).
2019-01-01 17:17:23 -08:00
a82b0d9d24
Added support for $(foo 1 baz 2) as a way to access (foo 1 baz 2)'s
...
meaning.
2019-01-01 15:53:21 -08:00
7762c8c45b
Added the ": for $ in $: ..." shorthand for indented comprehensions.
2018-12-31 01:37:21 -08:00
ec69ee6f62
Fixes for: indented strings ending in ", peeking at code object text
...
before modifying them, and major upgrades to the nomsu codegen,
including support for indented inline arguments (instead of using
"\n..") and just generally better line wrapping, including finally good
rules for when to use indented text (for almost all cases).
2018-12-30 23:58:43 -08:00
435eae7c0a
Some minor fixes for (type of $ast) and indexing codegen.
2018-12-30 21:17:10 -08:00
8a3c324087
Update to new syntax.
2018-12-30 19:04:45 -08:00
359152da17
Added parentheses to prevent stupid breakage.
2018-12-19 03:02:31 -08:00
a7d912a33a
Initial pass on updating syntax.
2018-12-18 19:30:12 -08:00
d3905474c9
Removed EOL comments
2018-12-14 20:54:18 -08:00
6abec65843
Fix for "\($x)abc" getting codegen'd to "$xabc"
2018-12-14 20:16:45 -08:00
64ba8aee07
Parenthesizing inline method targets when needed.
2018-12-14 20:09:32 -08:00
83a40b7493
Updating to support multiple method calls.
2018-12-14 19:25:03 -08:00
a7adc8cbff
Fixed multi-line methodcalls
2018-12-14 18:25:23 -08:00
5b6095b805
More fixes.
2018-12-14 17:56:26 -08:00
b38d9e0062
Fix for nomsu codegen for methods.
2018-12-14 17:55:17 -08:00
6ba84a0f50
Initial setup work for syntax version 5.
2018-12-14 17:49:46 -08:00
efd743591e
Renamed append/concat_append to add/concat_add for Code objects.
2018-11-29 14:57:56 -08:00
7f47d42040
In-progress (but working) overhaul of some elements including: function
...
calls, lib/thing.nom API, multi-assignments, varargs, etc.
2018-11-17 14:39:08 -08:00
367cfa19db
Fix for codegen of Set-style dicts.
2018-11-12 14:08:55 -08:00
2b4196bc20
Added (% as hex) and fixed bug with text interpolation codegen not
...
adding parens around indexchains.
2018-11-11 18:53:06 -08:00
9d82d522c1
Fixed some autoformatting stuff, and prepping to deprecate some math
...
shorthand.
2018-11-11 16:27:01 -08:00
5f38d73004
Now preserving hex numbers with "0xF00" -> parse -> decompile ->
...
"0xF00", fix for (compile error at ...)
2018-11-11 15:26:30 -08:00
9a75d25c84
Lots of fixes to the upgrading and codegen/autoformatting pipeline, also
...
deleted nomnom files, since they're mostly not needed anymore.
2018-11-11 15:05:56 -08:00
65ec3f597f
Recompile
2018-11-10 00:29:25 -08:00
1b9d57844e
Tweaks to line clumping
2018-11-10 00:29:20 -08:00
771007bc4d
Fixed word clumping with linebreaks.
2018-11-09 19:32:20 -08:00
b5a5b7f90d
Fixed other place for clumping "'"
2018-11-09 17:53:30 -08:00
63c14bdbc3
Changed clumping to only be different for "'", not other operators.
2018-11-09 17:50:12 -08:00
c36798f2ad
Recompile
2018-11-09 17:48:56 -08:00
b2cec10592
Fixed 's
clumping for stuff like (%foo's metatable)
2018-11-09 17:48:52 -08:00
6fa1cb23d1
Fixed decompile issue with short actions not getting indented.
2018-11-09 17:43:25 -08:00
b236ad88a9
Fixed comment clumping issue.
2018-11-09 17:36:36 -08:00
ed70165294
Better handling of shebangs and comments at the top of a file.
2018-11-09 17:33:04 -08:00
d6f33ab194
Improvements for parenthesization of escaped nomsu.
2018-11-09 17:20:51 -08:00
fa3f598fc3
Fixing the upgrade pipeline, plus some misc. fixes.
2018-11-09 17:02:53 -08:00
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