Commit Graph

1206 Commits (ac27a3ccee931aba28db3a5b734bc4cc7267dace)

Author SHA1 Message Date
Delyan Angelov ac27a3ccee parser,cgen: improve `[flag]enum Abc{ a b }`, allow `x := Abc.a | Abc.b` 2020-11-27 23:09:14 +02:00
Alexander Medvednikov fcd127ed87 autofree: make -experimental the default 2020-11-27 20:49:48 +01:00
Swastik Baranwal 2473f65278
cgen: minor cleanup (use replace_each) (#6978) 2020-11-27 16:13:30 +01:00
yuyi 636efb3c20
cgen: fix windows escape errors for comptime @ pseudo vars (#6977) 2020-11-27 11:16:57 +02:00
Daniel Däschle ee2a5727fb
gen: fix assigning an anon fn to a struct field (#6965) 2020-11-27 11:15:48 +02:00
Alexander Medvednikov c27818e247 all: remove remaining broken escape sequences 2020-11-27 03:17:19 +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
Nick Treleaven ea8adfdbf9
gen: more efficient `for in` with a map (#6961) 2020-11-26 23:22:14 +01:00
Alexander Medvednikov 5efd393af2 all: make comptime templates usable outside of vweb via $tmpl 2020-11-26 18:40:35 +01:00
Ruofan XU c6a8c3cad5
cgen: remove unneeded sumtype logic and add more tests (#6959) 2020-11-26 15:29:23 +01:00
Delyan Angelov fa126b950a cgen: prevent `undefined symbol: tcc_backtrace` errors with tcc and `-shared -d no_backtrace` 2020-11-25 15:47:55 +02:00
Delyan Angelov 35a0fe79f9 cgen: generate an unique sort comparator function for each .sort() call 2020-11-25 13:48:42 +02:00
Daniel Däschle 7d6f97259f
all: refactor UnionSumType to SumType (#6944) 2020-11-25 13:09:40 +02:00
Leah Lundqvist 96b73acad7
jsgen: optional "or blocks" (#6938) 2020-11-24 22:52:23 +01:00
Alexander Medvednikov 98034e5504 http: make download_file() return an optional 2020-11-24 18:07:08 +01: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
pancake aa90625819
js: initial support for optional return unwrapping (#6926) 2020-11-24 12:54:26 +01:00
Daniel Däschle 789912238f
gen: generate typedef first on sum types (#6930) 2020-11-24 12:53:39 +01:00
Nick Treleaven 380e3640e3
gen: add panic message when using '?' with `none` (#6919) 2020-11-23 16:16:38 +01:00
Daniel Däschle 96539e43b5
all: nested sum types (#6913) 2020-11-23 16:16:13 +01:00
Alexander Medvednikov a1827d7f98 autofree: handle array set/get 2020-11-22 20:48:23 +01:00
Alexander Medvednikov 311b5e8188 autofree: string.clone() fix 2020-11-22 13:45:12 +01:00
Alexander Medvednikov 65005fdae8 builtin: same fix for array.insert 2020-11-22 13:30:48 +01:00
Alexander Medvednikov f8827c3fe5 builtin: clone the strings correctly in array.push 2020-11-22 13:22:42 +01:00
Daniel Däschle 22fdf76db5
gen: unwrap optional on if guard expr (#6903) 2020-11-21 22:40:05 +01:00
Alexander Medvednikov 9a51f4e3c2 autofree: builtin fixes 2020-11-21 22:33:31 +01:00
Alexander Medvednikov 2afb9b30e9 autofree: minor fixes; skip in consts 2020-11-21 19:07:47 +01:00
Alexander Medvednikov ad940ff40e autofree: free parent scope vars only before fn returns 2020-11-21 18:23:50 +01:00
pancake 4b19a6e00d
js: fix code generation for `$if js` statements (#6896) 2020-11-21 15:40:37 +01:00
Daniel Däschle 838ad16296
all: refactor ast.Expr to use the new sum type implementation (#6792) 2020-11-21 00:05:57 +01:00
Alexander Medvednikov ff1752dfff gg: vfmt gg.v 2020-11-21 00:04:29 +01:00
Alexander Medvednikov c1486925d5 autofree: enable free_before_return test 2020-11-21 00:00:27 +01:00
Nick Treleaven d5242e0bf5
gen: implement labelled break and continue (retry) (#6887) 2020-11-20 12:23:48 +01:00
Alexander Medvednikov 4328233504 Revert "gen: implement labelled break and continue (#6880)"
This reverts commit e798326a1a.
2020-11-20 02:51:35 +01:00
Lukas Neubert a67873f6cf
jsgen: tests: ensure output deletion on fail (#6875) 2020-11-20 01:15:32 +01:00
Nick Treleaven e798326a1a
gen: implement labelled break and continue (#6880) 2020-11-19 21:13:15 +01:00
Daniel Däschle e06756ef58
all: match multi aggregate for union sum types (#6868) 2020-11-18 20:52:00 +01:00
pancake d8f64f516b
js: fix codegen for multiline strings (#6791) 2020-11-18 18:23:44 +01:00
Alexander Medvednikov 8e473181ed autofree: remove old logic 2020-11-16 17:31:34 +01:00
Alexander Medvednikov 68077b7dbf autofree: handle early returns (part 1) 2020-11-16 17:26:54 +01:00
Emily Hudson cd2a2cef25
vlib/net: add buffered IO, x.net -> net (#6754) 2020-11-15 22:54:47 +02:00
Alexander Medvednikov 26785668c0 autofree: more tests; gg: fix draw_circle with hidpi 2020-11-15 15:09:44 +01:00
Nick Treleaven 50163508f8
gen: implement type_name method for sum type instances (#6802) 2020-11-14 13:59:03 +02:00
Delyan Angelov 023cddb160 cgen: remove .replace('T', ...) 2020-11-14 10:36:59 +02: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 9c569246ef
cgen: fix typeof union sum type (#6794) 2020-11-12 12:27:54 +01:00
Daniel Däschle 43ce098043
cgen: fix default value init for union sum types (#6795) 2020-11-11 19:56:13 +02:00
Daniel Däschle 6271798ce3
cgen: union sum types implementation (#6745) 2020-11-11 09:18:15 +01:00