Commit Graph

736 Commits (2ccb28a93ee695cff8436e6af88bedabc592f0f3)

Author SHA1 Message Date
Delyan Angelov 8c4429c875 parser: fix passing the is_mut flag of anon fn arguments 2020-07-24 11:27:56 +03:00
Alexander Medvednikov 632e27a4a9 all: fix a big mutability bug and update all mutable vars 2020-07-23 23:16:36 +02:00
Alexander Medvednikov 32c1042ac6 parser: disable the duplicate import check for now 2020-07-23 22:20:00 +02:00
Alexander Medvednikov 653d40bfe8 parser: do not duplicate table imports 2020-07-23 21:59:48 +02:00
Louis Schmieder b537d8e23e
parser: comp `for` attrs array (#5903) 2020-07-23 17:19:37 +02:00
pancake 36352085ae
v: add support for iOS crosscompilation (#5943) 2020-07-23 07:58:44 +03:00
Ryan Willis 938e71b468
v: fix for `import cli { Command }` 2020-07-22 20:33:43 +03:00
joe-conigliaro d46a89b90d
parser/checker/fmt: optimize scope lookups by storing object with ident & add if expr smartcast support to vfmt (#5935) 2020-07-23 02:10:31 +10:00
spaceface777 f4251dded0
checker: suggest using `:=` when assigning to undefined variable (#5911) 2020-07-21 19:49:53 +03:00
Delyan Angelov e1eb9c4ff1 vfmt: fix `x := *&int(ptr)` 2020-07-21 15:58:17 +03:00
Delyan Angelov 35df792c05 vfmt: fix `#include "@VROOT/path/x.h"` 2020-07-21 14:26:49 +03:00
Nick Treleaven a74cbf55c7
checker: warn if C.m* or C.s* functions are called outside unsafe blocks (#5869) 2020-07-20 20:06:41 +03:00
Nick Treleaven e6fc8eb015
checker: check that array slicing indexes are valid (#5892) 2020-07-20 19:52:03 +03:00
Enzo 8653605b0a
fmt: allow for comments in call args and if expressions branches (#5871) 2020-07-20 17:48:33 +03:00
Enzo 8a855ccae1
fmt,vet: handle `var in [single_value]` (#5882) 2020-07-19 19:58:34 +02:00
Ryan Willis 1114fd28d0
all: import individual symbols feature (#5872) 2020-07-18 21:34:38 +02:00
Nick Treleaven 105a0e015e
checker: warn if unsafe method called outside unsafe block (#5863) 2020-07-17 19:14:12 +02:00
Enzo 90d9040e6e
all: make comment expressions + fix vfmt array init (#5851) 2020-07-17 19:13:22 +02:00
Nick Treleaven 39f90e25f3
all: `if` guard optional: define `err` in `else` branch (#5853) 2020-07-17 19:10:01 +02:00
Uwe Krüger f6947d111b
parser: fix `sizeof(int)` when used as call arg for external function (#5855) 2020-07-17 11:31:35 +03:00
spaceface777 3583302ad4
parser: force `...` rather than `..` in matches for inclusive ranges (#5852) 2020-07-17 11:30:21 +03:00
Lukas Neubert fa03f390b3
parser: add error for `for i := 0; i++; i < ..` (#5850) 2020-07-17 10:31:58 +03:00
spaceface777 b900577dae
compiler: handle ranges as `match` conditions (#5847) 2020-07-16 16:41:18 +03:00
Enzo 2ee8f93d60
parser: duplicate method declaration on interface (#5825) 2020-07-15 10:23:21 +02:00
Enzo de0b96f52c
parser: fail when interface name is duplicated (#5828) 2020-07-14 18:52:51 +02:00
Enzo d301611de7
fmt: interface decl fixes (#5829) 2020-07-14 18:52:28 +02:00
Nick Treleaven 53023c1ca9
all: add UnsafeExpr (#5793) 2020-07-12 12:58:33 +02:00
Delyan Angelov 9c43d36513 parser,checker: add `-d trace_parser`, `-d trace_checker` 2020-07-12 12:56:01 +03:00
Alexander Medvednikov d4dd5645fe parser: remove strconv import 2020-07-11 18:53:50 +02:00
Delyan Angelov b55f84c0a8 vfmt: turn off module is imported but never used for vfmt 2020-07-11 15:03:37 +03:00
Alexander Medvednikov d4d552fb00 vet: prohibit spaces after `(` 2020-07-11 11:41:39 +02:00
Emily Hudson 7488dd829d
all: _allow_multiple_values enum attribute (#5772) 2020-07-10 16:43:02 +02:00
Swastik Baranwal 9839b0eb7f
parser: handle `a,b += 1,1` (fix #5735) (#5783) 2020-07-10 13:59:17 +02:00
Daniel Däschle fb927dab60
checker: check all branches for return (#5763) 2020-07-09 22:38:43 +02:00
Daniel Däschle c5dc1a33b6
all: remove `it` smartcast and replace with original variable name (#5764) 2020-07-09 17:14:14 +02:00
Daniel Däschle e7cd496c31
parser: smartcast fix (#5756) 2020-07-08 16:08:44 +02:00
yuyi 64e9bdc213
parser: fix non-void optional fn missing return value (fix #5736) (#5741) 2020-07-08 16:01:17 +02:00
Daniel Däschle 5ea17ad2d4
all: if smartcast part 2 (#5754) 2020-07-08 15:46:58 +02:00
Daniel Däschle b62bf59c21
all: if-is smartcast part 1 (#5730) 2020-07-08 15:17:28 +02:00
Delyan Angelov 69d3c3f596 cgen: sort const inits/cleanups topologically, skip calling non `fn init(){}` fns 2020-07-08 14:28:58 +03:00
Alexander Medvednikov 2425c05c42 Revert "cgen: sort const inits/cleanups topologically too"
This reverts commit 38000f8622.
2020-07-08 12:56:56 +02:00
Delyan Angelov 38000f8622 cgen: sort const inits/cleanups topologically too 2020-07-08 11:22:30 +03:00
Louis Schmieder 3bb1d24dad
parser: add template path by fn name for vweb (#5737) 2020-07-08 09:12:57 +03:00
joe-conigliaro 2480cce1ed
checker: optimize if & fix typo 2020-07-08 01:36:48 +10:00
joe-conigliaro 5fd5e558ae
parser/checker/gen: anon fn direct call with args 2020-07-08 01:10:39 +10:00
Louis Schmieder 2a7a6fa1eb
orm: add delete stmt (#5725) 2020-07-07 16:55:32 +02:00
Uwe Krüger ef02373061
all: remove `rwshared` keyword, make its semantics default for `shared` (#5710) 2020-07-07 01:57:31 +02:00
spaceface777 d0e321c8a3
fmt: allow parsing files without `fn main()` (#5681) 2020-07-05 20:53:01 +02:00
KrisChambers 8d035a446a
Fix v/parser: Failure to parse structs with fields typed as anonymous functions returning having an optional void (`?`) return type. (#5684)
* Handle optional void return type in function types in struct fields.

* Add more testing for optional return types in struct fields.

* Move language parsing into it's own function

* Fix issue caused by not setting typ.

* Fix test for structs containing anon fn with optional void return types
2020-07-05 19:29:39 +02:00
yuyi 96bd4e8794
parser: fix type detection in `match` (#5679) 2020-07-05 16:35:45 +02:00