Delyan Angelov
f638caef39
compiler: v -autofree can now compile itself
2020-05-06 19:03:51 +03:00
Alexander Medvednikov
f80876497e
fmt: use the new `mut` syntax in args
2020-05-06 12:43:46 +02:00
Alexander Medvednikov
cc66eb1194
parser/checker: check capital letters in interface names/methods
2020-05-06 12:26:00 +02:00
yuyi
51f3f31a4e
checker: check string(1) cast error
2020-05-06 12:05:24 +02:00
Alexander Medvednikov
a0ca68ce3f
checker: do not allow `string(int)`
2020-05-05 15:26:42 +02:00
joe-conigliaro
d75f286230
parser: store FnDecl body position and use for scope
2020-05-04 20:31:34 +10:00
Delyan Angelov
242670a33d
compiler: add support for panic_debug with -cg
2020-05-03 22:13:59 +03:00
Delyan Angelov
7e4e3abc2c
compiler: circuimvent the dependency cycle v.ast <-> v.table
2020-05-02 22:52:10 +03:00
joe-conigliaro
483f0f408c
ast: allow scope var shadowing
2020-05-02 23:46:53 +10:00
Tanel Liiv
68ca8ab8a4
array: nested map()
2020-05-02 15:26:58 +02:00
Henrixounez
c500044bae
checker: unreachable code warning
2020-04-29 12:31:18 +02:00
Alexander Medvednikov
2fc05b814c
all: interface arrays
2020-04-29 12:21:15 +02:00
Enzo Baldisserri
682838a0cf
checker: check array and fields mutability
2020-04-27 22:53:26 +02:00
joe-conigliaro
9f76a7b250
parser: simplify unused vars & add loop/if vars etc
2020-04-27 23:16:31 +10:00
Alexander Medvednikov
f23948010a
parser: new array init syntax
2020-04-26 17:28:48 +02:00
Alexander Medvednikov
3ab8dc0092
parser: array init: `[]string` => `[]string{}`
2020-04-26 09:17:17 +02:00
Enzo Baldisserri
c73d91a8fe
fmt: TypeDecl; format more files
2020-04-25 20:58:00 +02:00
yuyi
c26e83f58a
array: fix fixed array errors
2020-04-25 18:26:38 +02:00
Enzo Baldisserri
fb54a2635c
fmt: lots of fixes
2020-04-25 17:49:16 +02:00
Delyan Angelov
a20bef65ba
fmt: workaround a vfmt limitation preventing formatting of vlib/v/ast/ast.v
2020-04-25 17:34:42 +03:00
Delyan Angelov
9a19531909
compiler: add support for `[if myflag]` void fn/methods
2020-04-25 16:57:11 +03:00
joe-conigliaro
fbcdffbbc8
table: move Type functions to methods
2020-04-25 17:08:53 +10:00
Enzo Baldisserri
323ca2b3bb
checker: check duplicates on match with no else
...
Refactor match duplication test to work even if there is not else, and to include every expression.
Add tests for duplicate expressions in match.
2020-04-24 17:04:39 +03:00
Delyan Angelov
adb8fb1dc6
comptime: fix custom -d flags and `$if x? {}`. Fixes ftp_test.v .
2020-04-23 17:52:44 +03:00
Enzo Baldisserri
7e400124e8
parser: allow blank ident in nested loops
2020-04-23 12:00:51 +02:00
Alexander Medvednikov
d7ee4755c2
parser/cgen: interfaces (part 1)
2020-04-22 20:23:53 +02:00
Kris Cherven
155891a4e0
parser: add unused variable warning
2020-04-22 01:52:56 +02:00
Alexander Medvednikov
ee2e83fef0
go back to `mut`. decisions, decisions...
2020-04-21 05:11:50 +02:00
Ruofan XU
cdb1b0344c
checker: improve type check for arithmetic assignment op and fix error pos
2020-04-20 20:56:05 +02:00
yuyi
717e26b45e
checker: more infix checks
2020-04-20 14:49:26 +02:00
Enzo Baldisserri
57c142b993
checker: disallow pub in main
2020-04-19 00:07:57 +02:00
Enzo Baldisserri
f2be3d7ffb
checker: check that right `is` type exists
2020-04-18 00:19:33 +02:00
Tim Basel
73073cd954
parser: anonymous functions (part 1)
2020-04-17 21:59:19 +02:00
Daniel Däschle
402e55d115
ast: expr.Position; struct field refactoring
2020-04-17 02:38:39 +02:00
Alexander Medvednikov
714ff50322
fmt: use the new receiver syntax
2020-04-16 15:42:40 +02:00
Delyan Angelov
8a1248b2e7
builder: restore module import cycle detection/topological reorder
2020-04-16 12:29:36 +03:00
Abdullah Atta
6a186e8f11
jsgen: implement js backend
2020-04-15 23:16:49 +02:00
Alexander Medvednikov
da28bc7026
Revert "fmt: `(var f Foo)`"
...
This reverts commit 4b110756e0 .
2020-04-15 04:15:42 +02:00
Alexander Medvednikov
4b110756e0
fmt: `(var f Foo)`
2020-04-15 03:56:16 +02:00
Delyan Angelov
e947d5e8c8
checker: fully exhaustive matches for sumtypes and enums
...
Also change the vlib/v/checker/tests/inout/match_expr_else.out to reflex the
new error details.
2020-04-14 16:50:43 +03:00
Daniel Däschle
12e48c6fe2
checker: check match for exhaustion
2020-04-14 01:03:31 +02:00
Daniel Däschle
79dad0bca9
parser: fix enum default value in struct
...
* parser: fix enum default value in struct
* Add a test for the enum default values in structs.
* Fix compilation of vfmt.
* Run vfmt over enum_default_value_in_struct_test.v
* Cleanup spurious , in vfmt output for enum declarations
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2020-04-12 13:35:54 +03:00
Alexander Medvednikov
053de0b8e3
checker: check variable mutability
2020-04-11 04:09:41 +02:00
Alexander Medvednikov
8fbae86bb3
vfmt: skip skipped modules; add module test
2020-04-10 22:32:52 +02:00
Alexander Medvednikov
b95a47b5a7
checker: check fn main(); vfmt: fix for{}, module and module comments
2020-04-10 22:27:54 +02:00
Delyan Angelov
fdac3a1f2e
ftp.v: fix compilation
2020-04-10 23:23:42 +03:00
Delyan Angelov
4f74410125
test-fixed: always chdir to main v folder before running the tests
2020-04-10 22:40:56 +03:00
Delyan Angelov
217e6f3b8e
checker/parser: allow for fixed array with sizes defined with a const
2020-04-10 22:01:22 +03:00
Alexander Medvednikov
f76931c01e
cache builtin modules
2020-04-10 18:11:43 +02:00
Daniel Däschle
42b3b19af4
checker: fix checker enum infix error
2020-04-10 15:44:01 +03:00