Commit Graph

471 Commits (f4b757e47d04e98359727df4859d4705d5c4b3c9)

Author SHA1 Message Date
zakuro 4b99d6af95
cgen: fix bug with duplicate defer generation (#8503) 2021-02-03 11:40:21 +02:00
Daniel Däschle d477e525bb
checker/gen: fix generic struct init (#8322) 2021-02-03 00:42:00 +11:00
Lukas Neubert 8755f40430
fmt: keep comments after imports (#8483) 2021-02-01 14:45:08 +01:00
spaceface effa3188dd
cgen: fix type casts to interfaces (#8476) 2021-01-31 19:24:33 +02:00
Larpon d25825df57
all: support compile time `$env('ENV_VAR')` (#8456) 2021-01-31 19:22:42 +02:00
Nick Treleaven 43c3a3b080
checker: fix compile-time call with string identifier expression (#8415) 2021-01-30 15:24:16 +01:00
div72 8c70920695
all: add offsetof (#8380) 2021-01-30 12:57:09 +01:00
Lukas Neubert 2774db077d
fmt: keep user choice for newlines in match branches (#8418) 2021-01-30 11:57:57 +01:00
yuyi 77b3d40f46
checker: fix `map = {}` (#8435) 2021-01-30 11:55:10 +01:00
Swastik Baranwal e03ece2a4b
checker: check the fn decl for anon fns too (#7529) 2021-01-29 23:11:05 +02:00
Lukas Neubert 3790bd67e3
fmt: minor cleanup of sql_expr (#8340) 2021-01-26 10:36:46 +01:00
Delyan Angelov d4f6f5eec4
sokol,fontstash: move f_d_use_freetype.v to vlib/fontstash/a_d_use_freetype.v 2021-01-23 11:39:17 +02:00
spaceface c2d501e8a9
all: implement interface fields (#8259) 2021-01-23 08:57:17 +02:00
Louis Schmieder e06e8b10cd
orm: fix empty struct and simplify (#8246) 2021-01-22 23:28:26 +01:00
Daniel Däschle 500ebf77e4
all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
Daniel Däschle 3ee7bc960f
checker/gen: fix smartcast pointer sumtype (#8260) 2021-01-21 22:31:25 +02:00
joe-conigliaro 97ebecc5f4
usecache: get all tests running with -usecache enabled by default (p.1) (#7699) 2021-01-20 06:04:59 +01:00
Tim Basel 129eee346b
fmt: keep single empty lines (#8189) 2021-01-19 14:49:40 +01:00
Lukas Neubert b44c08aff0
fmt: wrap match branch expressions (#8190) 2021-01-19 06:16:42 +01:00
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
Nick Treleaven df39e7001c
parser: support `module:` for immutable private struct fields (#8140) 2021-01-17 05:39:44 +01:00
Delyan Angelov c4c4b9c7b1
gen,checker: implement g.trace/2 and c.trace/2, similar to p.trace/2 2021-01-15 20:28:53 +02:00
Uwe Krüger 8d014d4646
sync: allow `go` routine join with return value (#8125) 2021-01-15 13:45:26 +01:00
Larpon f73500f2fe
all: add support for the `x := $embed_file('v.png')` compile time call (#8048) 2021-01-14 16:20:11 +02:00
yuyi a2efb5319d
all: change `[1,2,3]!!` to `[1,2,3]!` (#8101) 2021-01-14 03:51:13 +01:00
Nick Treleaven ac85257ea0
parser: fix sizeof(mod.Type), fix checking sizeof expression (#8065) 2021-01-13 06:13:39 +01:00
zakuro 33694665f0
fmt: align each contiguous field of struct. not the whole. (#7981) 2021-01-12 04:38:43 +01:00
Lukas Neubert 5d6e9f7bf9
fmt: fix rare extra tab after a SumType (#8035) 2021-01-11 22:19:42 +01:00
Lukas Neubert e79695e8fc
fmt: keep comments after call_expr in vscript (#7990) 2021-01-09 22:47:33 +01:00
Ned Palacios 256ddcee1f
v.ast: add walker submodule for ast walking (#7775) 2021-01-09 05:36:38 +01:00
Nick Treleaven 141b0cb882
checker: fix warning & allow assigning to a union field without unsafe (#7970) 2021-01-09 01:32:33 +01:00
Uwe Krüger cbe7740d97
fmt: do not generate `import` statements for auto imports (#7966) 2021-01-08 17:42:40 +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
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
Daniel Däschle 88d18f3303
checker: smartcast in for loops (#7942) 2021-01-07 21:35:32 +01:00
Nick Treleaven cbefe6c32f
parser: warn about old use of `typeof` (#7923) 2021-01-07 20:32:02 +01:00
Uwe Krüger ffd753abdc
all: implement `ch <- x or {...}` and `ch <- x ?` (#7928) 2021-01-06 21:19:40 +01:00
Nick Treleaven 3203a124b2
checker: warn when casting between reference types outside of `unsafe` (#7892) 2021-01-05 17:02:04 +02:00
Daniel Däschle 5841d5d8e1
all: implement basic comptime field selector (#7888) 2021-01-05 16:11:43 +02:00
Daniel Däschle 7c9fb73b3f
vfmt: fix comments before ...f in Abc{...f} (#7870) 2021-01-04 21:01:35 +02:00
Daniel Däschle 164d7bf5fb
parser: struct updating syntax with `Abc{...oldabc newfield: val}` (#7865) 2021-01-04 20:19:03 +02:00
zakuro dd516858d4
fmt: align struct field comments (#7632) 2021-01-03 21:10:25 +01:00
Swastik Baranwal a9ab79d301
checker: ban any_int/any_float outside buitlin (#7675) 2020-12-31 12:41:30 +01:00
lydiandy 20f507651e
v.ast: remove unused path and expr fields in Module (#7625) 2020-12-31 12:17:59 +02:00
Alexander Medvednikov ad78875a8c parser: allow `const x = 0` consts outside of const blocks 2020-12-30 02:15:44 +01: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 2360762a42
fmt: fix unexpected `comment`, expecting struct key for trailing arg syntax (#7658) 2020-12-28 20:26:24 +02:00
Lukas Neubert 4783503185
fmt: keep interface comments between methods (#7650) 2020-12-28 18:14:55 +02:00
lydiandy ecc7c27c9c
v.ast: document vlib/v/ast/ast.v (#7624) 2020-12-28 13:52:04 +02:00