29a87ff325
Support literal Text("blah") for text that is constant ASCII strings
2024-09-03 14:48:54 -04:00
5feecff9d9
Deprecate Where
and change channel API to use a boolean front
value
2024-09-03 03:53:36 -04:00
5a78eb61c8
Bugfix for hex escapes adjacent to hex-like characters
2024-09-02 21:54:38 -04:00
620ebeab8d
Fixing string methods
2024-09-02 20:22:13 -04:00
337aa911a9
Auto promote to C String from Text
2024-09-02 19:53:09 -04:00
6d7a359f8f
Bugfix some text replacement things
2024-09-02 19:49:52 -04:00
80a09e6dba
Fix up some integer and print statement stuff
2024-09-02 19:29:43 -04:00
b0a8404bd7
Fix enums/structs
2024-09-02 19:18:21 -04:00
00a3117803
Bugfix
2024-09-02 19:07:51 -04:00
94761d9a5a
Fix some stuff
2024-09-02 19:05:06 -04:00
61e482f6f3
Initial WIP first past
2024-09-02 18:47:39 -04:00
a197875214
Bugfix for say() when length is >512, and added back the newline
...
optional parameter (default=yes)
2024-08-23 12:42:10 -04:00
dceb925573
Bugfix for parsing ints
2024-08-23 11:38:54 -04:00
ad51b208b4
Overhaul of import syntax. Now everything uses use
: use foo
, `use
...
./foo.tm`, `use <foo.h>`, `use libfoo.so`
2024-08-22 14:02:48 -04:00
2055439be4
Variables can no longer hold function pointers, only closure_t's. This
...
makes error reporting easier and prevents issues where some functions
could be assigned, but not others. Also change outputs so Void returns
don't show up when displaying types, now just: `func()`
2024-08-21 00:49:22 -04:00
3c4f477b84
Bugfix some copy-on-write cases for when pointers are automatically
...
derefenced for method calls
2024-08-20 16:20:41 -04:00
5b945d8fc6
Remove unused parameter and add some docs on arrays
2024-08-20 16:00:58 -04:00
934b843b1c
Add .text_content as a field on DSLs instead of a method
2024-08-19 14:29:58 -04:00
ea6f9797be
Support DSL constructor working on DSL itself
2024-08-19 13:23:59 -04:00
4e732a718d
Restructure things so that DSL constructors do proper escaping
2024-08-19 13:23:02 -04:00
178dca6e88
Clean up codegen for strings that are just a single interpolated value
2024-08-19 13:14:36 -04:00
8c4210ba01
Support demoting int literals
2024-08-19 12:39:45 -04:00
752be14eed
Fix some numeric precision issues with how nums are printed
2024-08-19 01:46:37 -04:00
14b4a674e8
Fix precision of compiled numbers
2024-08-19 01:32:27 -04:00
c422806d87
Make sure imported/used modules are initialized properly
2024-08-19 00:52:35 -04:00
8363d53bd2
Update channel API to take a Where parameter
2024-08-18 23:59:13 -04:00
9e07c6adc7
Add Channel:peek()
2024-08-18 23:31:36 -04:00
2e8c949fdc
Rename push/pop to give/get, since it's not stack-ordered
2024-08-18 23:24:23 -04:00
7472837ee5
Add array:first(predicate:func(x:&T)->Bool)->@%T?
2024-08-18 22:28:04 -04:00
6f3b2c073a
Add enum.tag
as a way to do a boolean test for whether a value has a
...
particular tag or not
2024-08-18 20:58:36 -04:00
967b649da2
Deprecate #
operator in favor of .length and fix up some issues
2024-08-18 20:39:57 -04:00
d804b09b02
Added a .length field to arrays/sets/tables, added a .max_size field to
...
channels, and updated the API
2024-08-18 20:28:39 -04:00
6ef0583868
Fix array indexing
2024-08-18 15:51:19 -04:00
a49870f810
Add primality testing and next_prime()/prev_prime()
2024-08-18 15:22:51 -04:00
da4d07c665
Fix up some bigint logic issues
2024-08-18 12:47:29 -04:00
752ab8212c
Split BigIntType out of IntType and switch to using enums for the size
...
of ints/nums
2024-08-18 11:49:51 -04:00
8b94c2c7f1
Fix array ++= item
2024-08-18 02:58:44 -04:00
d0078ab024
Handle demotion of integers when we know what the expected type ought to
...
be and it's just a literal.
2024-08-17 23:43:30 -04:00
09c4ff2e43
Disallow accessing type members that start with underscores unless
...
you're inside the type definition.
2024-08-17 21:03:04 -04:00
20b7793963
Make small integer constants actually constant
2024-08-17 15:17:41 -04:00
2383d73645
Correct the logic to prevent promoting nums to ints automatically
2024-08-17 15:14:45 -04:00
de31398fe4
Add table:get_or_null(key) for tables with non-null pointer values,
...
which lets get() keep the non-null return type
2024-08-17 15:01:01 -04:00
cbe117a6d3
Allow for top-level or namespace-level variables that are initialized
...
with non-constant values by the use of an initializer function and
runtime checks for whether the variable is initialized.
2024-08-17 14:41:31 -04:00
a6be5c90ca
For cached functions with no arguments, use a static var instead of a
...
cache table
2024-08-16 01:46:05 -04:00
7c18773011
Bugfix for closures
2024-08-15 13:59:01 -04:00
688f883e16
Add array:find()
2024-08-15 03:01:04 -04:00
66ae30ac29
Add method for array:remove_item(item) and rename
...
array:remove(index)->array:remove_at(index) to avoid confusion. Also
hook up array:has()
2024-08-15 02:39:35 -04:00
ed1667cb37
Add array:shuffled() and checks for array insertion
2024-08-15 02:17:53 -04:00
eccc4e4721
Add binary search method to arrays
2024-08-15 01:59:42 -04:00
9c2d7c437d
Fix up type conversions with ints and nums
2024-08-14 14:57:01 -04:00