17 Commits

Author SHA1 Message Date
Stone Tickle
2afcdbdacb
restrict modules to embedded modules
also alter function syntax
2023-11-25 20:45:55 -05:00
Stone Tickle
5e1c455cbc
more progress 2023-11-17 22:39:51 -05:00
Stone Tickle
4a0272972e
more flexible functions 2023-11-15 21:54:30 -05:00
Stone Tickle
949c2cf44c
rename datastructures 2023-11-12 11:04:23 -05:00
Stone Tickle
40171e7e94
add quiet mode for parser 2023-03-15 13:36:42 -04:00
Stone Tickle
ba48defcd9
make the analyzer smarter 2023-02-26 22:27:14 -05:00
Stone Tickle
d90e4d4b6d
make muon fmt's comment preservation more robust 2022-11-16 11:57:39 -05:00
Stone Tickle
93ac403ffb
optimize literal objects
Previously, each time a literal was evaluated, a new object was created.
This meant that if you had code like:

foreach x : list
    if x == 'hello'
        do_something
    endif
endforeach

In each loop, when the condition was evaluated, a new string containing
'hello' was allocated.  With many loops or lots of literals inside
loops, this can become a source of wasteful memory use.

The implemented solution is to create these objects once during the
parse step, and then reuse them inside the interpreter.  Currently only
strings, bools, and numbers get this treatment, but it should be
possible to handle arrays/dicts composed purely of literals as well,
although that would start to get into constant folding.
2022-10-30 07:46:50 -04:00
Stone Tickle
4298aa2011
make muon reuse compliant
https://reuse.software
2022-10-25 10:54:31 -04:00
Stone Tickle
3004ac2b10
add if subtype to differentiate if and else if 2022-04-18 10:27:42 -05:00
Stone Tickle
d6110513ed
add unstable meson dsl formatter 2021-12-08 10:19:39 -06:00
Stone Tickle
dae2588bea
stringify fstring subs with special instruction 2021-10-01 16:25:47 -05:00
Stone Tickle
c1580f4c6e
remove unused function 2021-10-01 10:31:45 -05:00
Stone Tickle
6fbfd9b0d6
put token_data in lexer.h where it belongs 2021-09-28 19:49:26 -05:00
Stone Tickle
917cc768ff
use an automated tool to normalize header guards 2021-09-11 11:32:30 -05:00
Stone Tickle
1e3c212778
implement format strings 2021-08-10 09:02:09 +09:00
Stone Tickle
aff2d408bc
organize sources 2021-08-02 11:37:11 +09:00