Commit Graph

418 Commits

Author SHA1 Message Date
989dc3f442 Support if x := blah: ... 2024-09-11 01:48:15 -04:00
7126755275 Add optional types 2024-09-11 01:31:31 -04:00
23de8e1f5a Fix up some stuff with path escaping 2024-09-09 16:54:08 -04:00
8e27f0e796 remove debug code 2024-09-09 16:09:13 -04:00
013fbe22e0 Clean up CLI path arrays 2024-09-09 14:55:04 -04:00
6ea6aadd96 Correctly clean up CLI args that are paths 2024-09-09 14:48:33 -04:00
a306f94557 Add mktemp functionality 2024-09-09 02:43:15 -04:00
13a9304dec Initial working version 2024-09-09 00:22:12 -04:00
711afee405 Fix non-base10 integer literals 2024-09-08 22:12:13 -04:00
a4fff5cb49 Bugfix for default arguments not supporting enclosing types 2024-09-08 21:55:15 -04:00
aeed1992e9 Fix nearly every GCC warning and add __attribute__((pure/const)) where
appropriate
2024-09-08 17:17:15 -04:00
3f16e95127 USAGE and HELP need an underscore prefix so they're not imported into
other files. Also fixed up dependency tool so it works good now
2024-09-07 00:26:30 -04:00
6cc5562791 Support using text in conditionals 2024-09-06 23:01:31 -04:00
11fa4f548c Support 'when' statements as expressions 2024-09-06 14:15:55 -04:00
4b352f89a3 Add Shell dsl type 2024-09-06 11:37:33 -04:00
c075deeab4 Actual fix for incref issue 2024-09-06 04:14:50 -04:00
dc7ee868a6 Speculative fix for some incref issues 2024-09-06 04:11:00 -04:00
e47c45a93b Bugfix for "":join(table.keys) 2024-09-06 03:46:35 -04:00
3444d1652d Add comment 2024-09-05 15:44:49 -04:00
d99f0271ad Revert "Use stack() macro" (actually needs to work this way)
This reverts commit ed36765b42.
2024-09-05 15:43:52 -04:00
ed36765b42 Use stack() macro 2024-09-05 15:35:40 -04:00
04c8fb0362 Replace $Type with Type$info for builtin TypeInfos 2024-09-05 15:31:54 -04:00
391c1b6bde Rename table_t -> Table_t 2024-09-05 14:57:31 -04:00
abe45a3c25 Rename array_t -> Array_t 2024-09-05 14:56:37 -04:00
c82b664db9 Slightly clean up CLI usage error code for no-argument programs 2024-09-05 14:44:52 -04:00
a8be9efcd3 Rework CLI compilation so that all of the argument parsing is written to
the .tm.c file and the runner program is *just* a single function call
to the function that parses args and runs the main function. Also
improved some CLI usage error code
2024-09-05 14:38:37 -04:00
e6aea8c130 Add support for custom HELP for CLI tools 2024-09-05 13:57:48 -04:00
e1d0927744 Fix 'empty' clause for integer iteration 2024-09-05 12:44:01 -04:00
34d98f067e For big or arbitrarily big integers not known to be constant, do full
Int$plus(a,b) logic so it's definitely correct and doesn't error.
2024-09-05 12:41:13 -04:00
e91b53f070 Improve codegen for loops by not adding extra braces and just using the
integer literal for 64-bit ints when iterating over a numeric value
2024-09-05 12:28:28 -04:00
d801681026 Add early outs for (or) and (and) reducers 2024-09-05 11:51:07 -04:00
0d3c8e16bc Add iteration-over-comprehension optimization 2024-09-05 11:23:00 -04:00
e2118b7407 Better enum messaging for CLI arg parsing 2024-09-04 21:33:06 -04:00
453c3610f9 Support parsing enums (without members) 2024-09-04 16:21:27 -04:00
3513b94fc7 Unify parsing code to correctly handle parsing integers and numbers with
a &success boolean. Check for overflow as well.
2024-09-04 16:08:34 -04:00
973b1c55c2 Fix array CLI arguments 2024-09-04 15:30:38 -04:00
e9796e1433 Improve command line parsing (no more cords) 2024-09-04 15:23:23 -04:00
0d098c118b Add automatic --help to print usage 2024-09-04 14:34:24 -04:00
ac507da537 Remove unused code path for >> f := use ./foo.tm 2024-09-04 13:49:41 -04:00
d1b2e9f598 Disallow 'use' statements that aren't top level 2024-09-04 13:48:26 -04:00
f605df8230 Minor codegen cleanup 2024-09-04 13:37:00 -04:00
97a964aa86 Implicit filename for table getting 2024-09-04 05:05:31 -04:00
af15e89303 For arrays, use implicit filename from macro 2024-09-04 05:04:45 -04:00
1092185c84 Improve codegen by making test() even more concise 2024-09-04 05:01:21 -04:00
79c1e8f989 Don't put __SOURCE_FILE__ in header 2024-09-04 03:04:42 -04:00
ec688c11bb Clean up codegen so $Foo"..." comes out as foo$Foo("...") instead of
Text("...")
2024-09-04 00:18:03 -04:00
805082d299 Minor codegen cleanup Texts(...) 2024-09-03 23:35:42 -04:00
f60edfbe7f Improve codegen for doctests a little bit by using __SOURCE_FILE__ macro
and making assignments use (x = 4, &x) syntax instead of ({ x = 4; &x })
2024-09-03 23:32:02 -04:00
e15cb21cd5 Fix up CLI parsing 2024-09-03 21:09:11 -04:00
29a87ff325 Support literal Text("blah") for text that is constant ASCII strings 2024-09-03 14:48:54 -04:00