Commit Graph

1668 Commits (9d0a5942acc0f75c500efb5d9cff98ebeb2630b4)

Author SHA1 Message Date
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
div72 cec7e91714
v.parser, v.checker, v.gen: add support for [translated] tag (#13373) 2022-02-06 00:16:02 +02:00
Vincenzo Palazzo b9fce4ef09
checker: make sure that the operator check is made on the concrete type (#13360) 2022-02-05 00:11:24 +02:00
Delyan Angelov 85d36ed231
checker: stricter type casting error messages 2022-02-03 14:18:30 +02:00
Delyan Angelov 71d98717dc
checker: small cleanup of commit edc6c9e 2022-01-28 11:03:15 +02:00
Yamada Hayao edc6c9e24f
checker: show error instead of panic, when using a `somemodule.NonExistingEnum.enum_value` (#13295) 2022-01-28 11:02:51 +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 291a1ffd8d
token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
yuyi d71fc0d13f
checker: fix error for cast to alias of reference struct (#13278) 2022-01-26 12:32:14 +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 0347dadf75
ci: vfmt checker.v 2022-01-24 14:01:35 +02:00
skurgs 7fd08eca96
checker: fix c error on improper string to rune cast (#13197) (#13257) 2022-01-24 12:13:22 +02:00
Delyan Angelov 295156e054
checker,cgen: implement v.profile.on/1, support `[if profile]` and `-d no_profile_startup` (#13232) 2022-01-21 03:26:05 +02:00
yuyi 09797e493e
checker: check generics undefined operation of infix expression (#13223) 2022-01-20 08:57:25 +02:00
Tim Basel 14b33baa3b
transformer: refactor + apply transform to (hopefully) all nodes (#13216) 2022-01-20 08:40:16 +02:00
Alexander Medvednikov 38d3239b50 checker: c2v fixes 2022-01-19 15:26:24 +03:00
trueFireblade 727c9fb4a1
all: add string range OrExpr (#13189) 2022-01-17 13:03:10 +03:00
Larpon 7276705684
checker: add support for apk comptime if (#13079) 2022-01-07 13:38:21 +02:00
Ken 7dc64de360
checker: fix error for cast to u8 (#13072) 2022-01-07 12:54:11 +02:00
yuyi 1c382ad2b4
checker: fix error for cast to u8 (#13058) 2022-01-06 18:36:31 +02: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
Delyan Angelov 57fa9768d5
checker: update error message for `if 'a' in 'abcd' {` 2022-01-05 12:21:17 +02:00
yuyi ba9aad1d92
checker: fix cast to byte in comptime if (#13036) 2022-01-05 09:27:10 +02:00
yuyi 6c1ae4f689
ast: simplify mktyp() (#13028) 2022-01-04 18:37:18 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Delyan Angelov 41e763f79c
checker: add error for `type StructAlias = Struct struct Struct { field StructAlias }` 2022-01-02 15:54:40 +02:00
yuyi 64f1ea6fe9
checker: extract containers.v, struct.v, for.v from checker.v (#13012) 2022-01-02 15:52:19 +02:00
yuyi 6438512529
checker: add error for `for mut var in string {` (fix #12998) (#13000) 2021-12-31 09:54:06 +02:00
Delyan Angelov b10ff1e41b
checker: infer generic interface type in `i := Interface(Struct<u32>{})` 2021-12-30 21:24:52 +02:00
Delyan Angelov ae036b6146
checker: fix infinite recursion on generic interface cast 2021-12-30 19:28:42 +02:00
Delyan Angelov 93c40e696d
all: add support for `type MyEnumAlias = MyEnum` 2021-12-30 13:42:06 +02:00
yuyi d421f28de4
checker: minor cleanup in cast_expr() (#12995) 2021-12-29 21:48:23 +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
yuyi c1711b8f05
checker: check string cast to number (fix #12982) (#12983) 2021-12-28 07:55:39 +02:00
yuyi 34e175a343
checker: minor cleanup of the fns classification (#12977) 2021-12-27 13:11:10 +02:00
yuyi 03864e4ab8
checker: fix cast enum to alias (#12968) 2021-12-26 11:34:20 +02:00
yuyi 8764a3a973
checker: check errors of cast to byte (#12961) 2021-12-25 11:34:15 +02:00
yuyi a83786d867
checker: minor cleanup in cast_expr() (#12954) 2021-12-24 11:38:27 +02:00
yuyi d4f28c88b3
checker: minor cleanup in the checker.v (#12945) 2021-12-23 15:02:09 +02:00
Delyan Angelov e256f1b2aa
checker,cgen: stabilise generic method handling (fix a source code ordering issue) 2021-12-22 18:03:46 +02:00
penguindark 278c08704c
all: support slices with negative indexes `#[start..end]` (gated arrays) (#12914) 2021-12-22 16:34:02 +03:00
playX 5f0160bf11
js,gg: more work on porting gg to JS backend (#12903) 2021-12-20 16:18:21 +03:00
yuyi cd0b581445
ast: rename 'table.get_type_symbol()' to 'table.sym()' and more related calls (#12898) 2021-12-19 18:25:18 +02:00
Delyan Angelov 6ff953d936
preludes,builder,cgen: add support for VTEST_RUNNER=tap and -test-runner tap (#12523) 2021-12-16 15:59:46 +02:00
Delyan Angelov caac89d6ca
checker: fix `function x is private` error in main, for `pub const abc = x()` in a (sub)module 2021-12-16 12:03:49 +02:00
yuyi d8a333058d
checker, cgen: fix generic map with generic type key (#12859) 2021-12-16 09:53:05 +02:00
spaceface 65f12f3217
checker: fix invalid cast warning for flag enums (#12848) 2021-12-15 16:58:25 +02:00
playX 11d2b8b354
js: support `-es5` flag (#12846) 2021-12-15 15:47:34 +02:00
Leo Developer 8c1c70db04
checker: fix x.$(field.name) not working outside of $if (#12802) 2021-12-12 03:18:29 +02:00
Delyan Angelov 79de408ef0
parser,checker: support `[generated] module xyz` (turns off notices). Use it for `infix.v`. 2021-12-12 00:58:38 +02:00