Commit graph

39 commits

Author SHA1 Message Date
Delyan Angelov
083dc23db8
gen: implement a [manualfree] tag, for functions, that want to do their own memory management 2021-01-08 16:22:27 +02:00
yuyi
10e7045bee
cgen: fix array/fixed_array_rune_str (#7881) 2021-01-05 18:16:55 +02:00
Swastik Baranwal
dee3bbffe9
cgen: support .str() for maps with non string keys (#7806) 2021-01-02 20:25:46 +02:00
Joe Conigliaro
3e655d6bf6
cgen: fix multi return auto str methods. closes #7726 2020-12-31 10:21:02 +11:00
yuyi
27db4b4c23
cgen: minor cleanup of cgen.v (#7688) 2020-12-29 20:57:34 +02:00
joe-conigliaro
02965e753e
all: re-implement variadics using arrays & implement array decomposition to varg (#7689) 2020-12-29 16:14:08 +01:00
Joe Conigliaro
d094baf107
cgen: add temp (TODO) auto str for interfaces 2020-12-29 20:25:38 +11:00
Lukas Neubert
06fdf34214
fmt: unwrap long single line ifs (#7608) 2020-12-27 14:20:30 +01:00
yuyi
b10f692c43
gen: fix errors of string interpolation of fn values in struct/array/map (#7367) 2020-12-17 11:16:27 +02:00
yuyi
525b521b4a
cgen: impliment gen_str_for_fn_type() (#7353) 2020-12-16 11:07:58 +02:00
joe-conigliaro
a05408b49a
all: make type system use source name & cleanup storing name in fields 2020-12-06 14:55:08 +11:00
Nick Treleaven
0d28f12c54
map: use untyped keys for DenseArray and interleave keys and values (#7142) 2020-12-05 22:53:50 +01:00
Nick Treleaven
d590ce7675
map: add 3 DenseArray methods for bootstrapping (#7113) 2020-12-03 21:12:53 +02:00
yuyi
06eaded6ea
string: change tos_lit to _SLIT (#7079) 2020-12-03 16:02:48 +01:00
Daniel Däschle
5b6eb7b2c9
cgen: simplify .str() generation (#7038) 2020-12-01 16:09:03 +01:00
Daniel Däschle
879d238887
cgen: initial option auto str support (#7004) 2020-12-01 04:00:23 +01:00
spaceface777
4e6bc27b30
compiler: fix self compilation with cached modules on macOS (#7023) 2020-11-29 19:30:35 +01:00
joe-conigliaro
91eca539d0
all: -usecache fixes and self compilation & some type cname optimisation (#7015) 2020-11-29 14:10:45 +01:00
Alexander Medvednikov
62ee436944 all: remove broken escape sequences after $ in strings 2020-11-27 03:07:37 +01:00
Daniel Däschle
d71d9ad7c0
сgen: print generic structs (#6967) 2020-11-26 23:57:03 +01:00
Daniel Däschle
7d6f97259f
all: refactor UnionSumType to SumType (#6944) 2020-11-25 13:09:40 +02:00
Daniel Däschle
a042966082
all: remove old sumtype code (#6937) 2020-11-24 17:55:24 +01:00
Daniel Däschle
aa6303f0b2
all: use the new types with old syntax (#6922) 2020-11-24 13:58:29 +01:00
Delyan Angelov
7feb1742d3 cgen: skip deleted map entries in the auto generated .str() method 2020-11-13 13:37:11 +02:00
Daniel Däschle
6271798ce3
cgen: union sum types implementation (#6745) 2020-11-11 09:18:15 +01:00
Daniel Däschle
9d5be12517
gen: add prefix when printing type aliases (#6701) 2020-11-03 14:13:35 +01:00
Daniel Däschle
9fdf04b7ff
cgen: make generics printable (#6700) 2020-10-31 19:43:06 +02:00
Enzo
b083f4014b
fmt: fix multiple things and format most of the compiler (#6631)
Format expressions inside string interpolation like the rest (it used to be a+b instead of a + b, not too sure why)
Fix formatting some match branches when there were only one statement inside (it was inlined)
Fix parsing and formatting some comments edge case on struct field init. You should check out this test because the result is a bit different from before. I personally find it more logical but I would understand if the former format was to stay
Fix formatting of void-returning function signature
2020-10-15 22:12:59 +02:00
Alexander Medvednikov
7da1afa140 all: switch to the new fn arg syntax everywhere; add lots of vfmt -verify tests 2020-10-15 12:32:28 +02:00
Daniel Däschle
2204bad7cf
gen: removes space on struct printing (#6535) 2020-10-02 13:06:02 +02:00
Daniel Däschle
8e8e808fc9
gen: fix sumtype custom str (#6534) 2020-10-02 09:32:07 +02:00
Daniel Däschle
c38a050125
cgen: fix array and map printing (#6508) 2020-09-30 01:26:27 +02:00
Daniel Däschle
d782de5b00
gen: struct str fixes (#6483) 2020-09-25 23:12:33 +02:00
Daniel Däschle
90d1a689db
gen: fix str gen for pointers in structs (#6462) 2020-09-24 21:14:16 +02:00
Daniel Däschle
4f09ddccb4
cgen: implement sum type str gen (#6454) 2020-09-23 20:51:51 +02:00
Henrixounez
e429a77de2
gen: named imported structs operator overloading and str methods (#6433) 2020-09-20 19:51:14 +02:00
Henrixounez
4038ac463c
gen: bytes array print not ending prematurely when null byte (#6401) 2020-09-18 01:12:32 +02:00
Alexander Medvednikov
88988817d0 parser: minor match simplification 2020-08-10 19:54:38 +02:00
Alexander Medvednikov
adafd24819 gen: auto_str_methods.v 2020-08-01 16:36:12 +02:00