Commit Graph

319 Commits (ac2c3847afc0f7a9a0d3b99064188124df6a6fb5)

Author SHA1 Message Date
Lukas Neubert ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Lukas Neubert 16c9cbce7c
fmt: correctly increase f.line_len for write_indent (#8174) 2021-01-18 06:02:29 +01:00
Swastik Baranwal ef627c9d21
checker: improve message and positioning for operator overloading (#8133) 2021-01-17 03:37:44 +01:00
Uwe Krüger 8d014d4646
sync: allow `go` routine join with return value (#8125) 2021-01-15 13:45:26 +01:00
Swastik Baranwal 0ca36aafe2
cgen: allow assignment operators for type aliases (#8086) 2021-01-15 02:27:19 +01:00
Nick Treleaven 0f2a770b9c
checker: improve errors for interface method compatibility (#8097) 2021-01-13 23:44:29 +01:00
zakuro 47536df2d0
table: remove nr_dims from Array (#8053) 2021-01-13 23:43:19 +01:00
zakuro 33694665f0
fmt: align each contiguous field of struct. not the whole. (#7981) 2021-01-12 04:38:43 +01:00
Uwe Krüger 5f95dd54bd
builtin: rename `any_*` -> `*_literal` - 2. part (#8032) 2021-01-11 22:58:15 +01:00
Daniel Däschle bbac95a438
parser: error on recursive struct (#7964) 2021-01-09 01:33:36 +01:00
Delyan Angelov 46a5c487c1
parser,fmt: implement `[manualfree] module abc` for opting out *all* fns in a given .v from autofree 2021-01-08 17:24:42 +02:00
Alexander Medvednikov e3f8d448c1 all: [noinit] struct attribute 2021-01-08 04:49:16 +01:00
Nick Treleaven 7a6b160d63
checker: fix indexing a type alias instance (#7889) 2021-01-05 19:17:18 +01:00
Uwe Krüger 4a25c2bb6f
types: rename `any_*`, `untyped *` -> `* literal` (#7845) 2021-01-04 00:11:09 +02:00
Delyan Angelov d86304b7d0
v.table: use the user readable names inside type_to_str_using_aliases for `any_int` and `any_float` 2021-01-03 22:15:18 +02:00
zakuro dd516858d4
fmt: align struct field comments (#7632) 2021-01-03 21:10:25 +01:00
Delyan Angelov 745a7f8d8f
ci: run vfmt over checker.v and types.v 2021-01-03 19:02:33 +02:00
Joe Conigliaro 70b921c49d
all: change any_int & any_flt display name 2021-01-04 03:20:52 +11:00
zakuro b3de003302
fmt: fix broken formatting in fn struct fields (#7794) 2021-01-02 16:36:31 +01:00
Swastik Baranwal a9ab79d301
checker: ban any_int/any_float outside buitlin (#7675) 2020-12-31 12:41:30 +01:00
Joe Conigliaro b2bd2c9337
cgen: make multi return decl order consistant & use typedefs. closes #7728 2020-12-31 21:55:21 +11:00
joe-conigliaro 02965e753e
all: re-implement variadics using arrays & implement array decomposition to varg (#7689) 2020-12-29 16:14:08 +01:00
Lukas Neubert 97bfabf194
fmt: heavily refactor and improve/fix logic for structs that use short args syntax (#7653) 2020-12-28 18:14:08 +02:00
Lukas Neubert 06fdf34214
fmt: unwrap long single line ifs (#7608) 2020-12-27 14:20:30 +01:00
spaceface 214290d55b
fmt: add a space around single-line `unsafe` expressions (#7505) 2020-12-23 19:13:42 +01:00
Daniel Däschle b27f5c378c
all: reimplement struct embedding with methods (#7506) 2020-12-23 19:12:49 +01:00
yuyi b47daad40d
all: remove redundant array.contains definitions (#7464) 2020-12-22 08:32:32 +01:00
yuyi 829334890b
table: minor optimization of types.v (#7419) 2020-12-20 04:54:49 +01:00
Delyan Angelov 04757a4853
vfmt: fix `struct Abc { field fn() ? }` 2020-12-18 11:32:04 +02:00
joe-conigliaro f2f32626bc
all: get -usecache working with mods in ~/.vmodules (ui examples) 2020-12-17 16:08:28 +11:00
joe-conigliaro a7879ce77e
parser: differentiate recursive alias & existing type err + rune fix 2020-12-16 18:03:49 +11:00
Lukas Neubert d59c5b01e1
fmt: intelligent line wrap for trailing struct syntax (#7309) 2020-12-14 05:03:17 +01:00
joe-conigliaro 6f474913cf
table: properly detect duplicate types 2020-12-11 17:39:51 +11:00
Delyan Angelov 338f3afd31
vfmt: fix `type MyFn = fn (int) int mut arr := []MyFn{}` 2020-12-09 15:18:45 +02:00
joe-conigliaro 78a6795319
all: change the way import symbols work & support consts (#7182) 2020-12-07 19:13:03 +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
spaceface777 50a3009113
fmt: make single-stmt `or` blocks single-line (#7126) 2020-12-04 13:25:23 +02:00
Lukas Neubert 02ba923ba7
fmt: do not add braces for trailing struct arg (#7072) 2020-12-04 11:22:26 +02:00
joe-conigliaro ff63fb74d9
dont allow method on non-local types & no mod for arrays. closes #6971 2020-11-30 11:43:22 +11:00
joe-conigliaro 91eca539d0
all: -usecache fixes and self compilation & some type cname optimisation (#7015) 2020-11-29 14:10:45 +01:00
Delyan Angelov 321daede1d cgen: fix a buggy comparison, add ability to do println(sym.debug()) 2020-11-28 19:48:53 +02: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
Alexander Medvednikov e0d64903f8 table: rename atypes.v to types.v now that the order of the files is irrelevant 2020-11-23 18:19:51 +01:00
Daniel Däschle 96539e43b5
all: nested sum types (#6913) 2020-11-23 16:16:13 +01:00
Daniel Däschle ed874ffc5b
checker: fix sum type operator check (#6815) 2020-11-17 21:26:40 +01:00
Delyan Angelov f995aa35ea checker: add a check for `x := math.sin<f64>(0)` 2020-11-15 11:51:12 +02:00
Delyan Angelov d6d202341a table: add a helper `pub fn (t Type) debug() []string {}` 2020-11-14 11:39:58 +02:00
Daniel Däschle 6271798ce3
cgen: union sum types implementation (#6745) 2020-11-11 09:18:15 +01:00