1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

1060 Commits

Author SHA1 Message Date
yuyi
0d9792bdf2
ast: cleanup in find_method_with_generic_parent() (#13600) 2022-02-26 02:11:56 +03:00
Larpon
d80f5165dd
fmt: keep trailing comments after fn header decl (#13596) 2022-02-25 16:36:48 +03:00
yuyi
a28249c119
ast: fix for in iterator of generic struct (fix #13579) (#13585) 2022-02-24 10:48:52 +02:00
yuyi
b5e7cef1b1
ast: define 'const invalid_type_idx = -1' (#13573) 2022-02-23 11:54:43 +03:00
playX
b842e89acc
all: initial implementation of compile-time types (#13549) 2022-02-21 17:42:54 +02:00
yuyi
83cdd8bedd
ast: add comments for struct 'StructInit' and 'StructInitField' (#13551) 2022-02-21 12:48:53 +02:00
Delyan Angelov
d25652fbcf
parser, ast: support -d for trace_rewrite_already_registered_symbol, trace_register_sym, trace_parse_stmt, trace_parse_comptime, trace_parse_text, trace_parse_file, trace_parse_vet_file 2022-02-15 13:20:40 +02:00
yuyi
f9fc136c24
all: rename InterfaceDecl.ifaces to InterfaceDecl.embeds (#13475) 2022-02-15 11:17:39 +02:00
yuyi
dc0b0c83c6
ast: fix error for interface embedding call (#13466) 2022-02-14 19:22:44 +02:00
yuyi
8119a297f7
ast: fix error for 'struct embed is interface' (#13465) 2022-02-14 13:43:36 +02:00
yuyi
2e0f8ee9e2
ast: fix error for struct embedding with interface (#13457) 2022-02-14 02:33:47 +02:00
Delyan Angelov
799c95dc4e
tests: filter test_ fns with params from the list of automatically run test functions (fix #13443) 2022-02-12 17:30:20 +02:00
yuyi
ae0e90f5d8
cgen: fix struct init with embed field update (#13444) 2022-02-12 08:16:51 +03:00
yuyi
7178367de0
all: fix error for comptime for in field with generic fn (fix #13409) (#13439) 2022-02-11 22:00:13 +02:00
Tim Basel
9d0a5942ac
builtin: change IError msg and code to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
Delyan Angelov
9ed18efa53
checker: error on redefining any of the public builtin functions, not just ['print', 'println', 'eprint', 'eprintln', 'isnil', 'panic', 'exit'] (#13419) 2022-02-10 12:26:30 +02:00
yuyi
4be3c92640
checker: check generic struct init without type parameter (#13404) 2022-02-09 14:06:45 +02:00
div72
cec7e91714
v.parser, v.checker, v.gen: add support for [translated] tag (#13373) 2022-02-06 00:16:02 +02:00
yuyi
a61b4809dc
ast, parser, checker: fix generic struct init with inconsistent generic types (#13359) 2022-02-04 14:24:38 +02:00
yuyi
a014844050
cgen: fix error for interface with multi nested embed structs (fix #13331) (#13336) 2022-02-01 14:50:12 +02:00
yuyi
b34860e39b
ast, checker: fix error for calling complex nested generic type function (fix #13025) (#13328) 2022-01-31 13:00:27 +02:00
Delyan Angelov
e1a2ab345d
parser,ast,checker: add support for [deprecated: "use another module"] module obsolete 2022-01-27 12:34:14 +02:00
yuyi
3bd528b218
ast, checker, cgen: fix error for map sumtype value init (#13290) 2022-01-27 09:44:34 +02:00
yuyi
291a1ffd8d
token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
yuyi
ca1f675dba
ast, checker, cgen: implement if guard with multi return optional (#13273) 2022-01-25 14:36:33 +02:00
Delyan Angelov
5f38ba896e
parser,cgen: handle const x = $embed_file("file.txt").to_string() 2022-01-25 11:40:07 +02:00
yuyi
ffb263c2e1
ast: minor cleanup of commented struct Field (#13231) 2022-01-21 15:00:21 +02:00
yuyi
05ff8f516d
ast: fix error for generic sumtype init in generic fn call (#13238) 2022-01-21 14:46:55 +02:00
Tim Basel
14b33baa3b
transformer: refactor + apply transform to (hopefully) all nodes (#13216) 2022-01-20 08:40:16 +02:00
yuyi
ba3308296b
ast: rename register_type_symbol to register_sym (#13217) 2022-01-19 20:16:23 +02:00
yuyi
31615d67c4
ast: fix typos in resolve_init() (#13191) 2022-01-17 11:00:57 +02:00
yuyi
dfc23d939f
ast, checker, cgen: fix array of sumtype initialisation with a default init: (#13178) 2022-01-15 09:59:38 +02:00
yuyi
155f897270
ast, parser, checker: fix generic struct field with default struct value (#13158) 2022-01-13 22:25:25 +02:00
Tim Basel
10efe47f03
parser: add support for mutable if guards (#13132) 2022-01-11 15:32:58 +02:00
yuyi
64c8fb061d
ast: fix generics with nested generic type parameter (fix #13077) (#13088) 2022-01-08 19:19:45 +02:00
Ken
9cbfa882e6
ast: support attributes for ast.SumType (#13010) 2022-01-08 17:35:10 +03:00
Delyan Angelov
d3489d4246
builtin: s.trim_prefix/1 -> s.trim_string_left/1, s.trim_suffix/1 -> s.trim_string_right/1 2022-01-05 12:49:22 +02:00
yuyi
6c1ae4f689
ast: simplify mktyp() (#13028) 2022-01-04 18:37:18 +02:00
yuyi
b94c5c2a9c
ast: fix fn_type_signature for anon functions with alias arguments (#13024) 2022-01-04 16:02:53 +02:00
Alexander Medvednikov
59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
yuyi
00a0c1886e
ast, cgen: fix const fixed array of reference value (#13022) 2022-01-04 11:36:29 +03:00
Delyan Angelov
41e763f79c
checker: add error for type StructAlias = Struct struct Struct { field StructAlias } 2022-01-02 15:54:40 +02:00
Delyan Angelov
93c40e696d
all: add support for type MyEnumAlias = MyEnum 2021-12-30 13:42:06 +02:00
Delyan Angelov
bf9f684c59
ast: improve support for type aliases, in TypeSymbol.xyz_info methods 2021-12-30 13:17:10 +02:00
Delyan Angelov
7531f78f67
ast: remove const hack for global_table, use a proper global instead 2021-12-30 13:15:55 +02:00
Delyan Angelov
43fee6b3d5
all: fix registration of methods with the same name on different generic structs 2021-12-28 21:42:48 +02:00
Alexander Medvednikov
6176ce9f03 all: c2v fixes 2021-12-28 08:00:56 +03:00
yuyi
55d9c24063
ast: fix generic fn with multiple return (#12971) 2021-12-26 16:44:41 +02:00
Daniel Däschle
35282396ec
all: inline sum types (#12912) 2021-12-25 18:26:40 +03:00
yuyi
c0dcd1a9a5
ast: fix reference of alias char type (#12951) 2021-12-24 11:11:20 +02:00