Uwe Krüger
118ca1240e
all: allow `shared` element types for `struct` and arrays ( #8631 )
2021-02-08 00:28:29 +01:00
Lukas Neubert
7f4c582f1a
fmt: unwrap long infix exprs inside parenthesis if necessary ( #8609 )
2021-02-07 23:10:39 +01:00
Delyan Angelov
119dfc0bb0
all: support map[f32]string and map[f64]string (float map keys) too ( #8556 )
2021-02-04 23:59:49 +01:00
Alexander Medvednikov
36e75e5208
Revert "parser: fix panic when single letter receiver parsed ( #8381 )"
...
This reverts commit 93b0d8ca64
.
2021-01-28 10:59:04 +01:00
Daniel Däschle
93b0d8ca64
parser: fix panic when single letter receiver parsed ( #8381 )
2021-01-28 10:56:43 +01:00
Uwe Krüger
79b4b0e6c8
parser: assure explicit `map` init contains no parameters ( #8299 )
2021-01-24 01:06:43 +02:00
Daniel Däschle
35432c5e92
gen: fix generic multi return ( #8303 )
2021-01-23 23:41:32 +02:00
Lukas Neubert
8b61891348
fmt: smarter if condition wrapping ( #8201 )
2021-01-23 10:33:22 +02:00
Delyan Angelov
b10b76bb0d
parser: remove the 'non-string keys are work in progress' warning
2021-01-22 12:25:17 +02:00
yuyi
190bb38087
checker: check fixed array size ( #8224 )
2021-01-20 23:17:49 +02:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 ( #8029 )
2021-01-18 13:20:06 +01:00
yuyi
73fd4396c3
parser: fix fixed array using const size ( fix #8144 ) ( #8161 )
2021-01-18 06:03:03 +01:00
Nick Treleaven
5185a59ac7
parser: use Parser.builtin_mod instead of checking p.mod ( #8137 )
2021-01-17 05:31:41 +01:00
Daniel Däschle
53941c4a0a
fmt: fix if cond break readability ( #8132 )
2021-01-16 02:12:17 +01:00
zakuro
47536df2d0
table: remove nr_dims from Array ( #8053 )
2021-01-13 23:43:19 +01:00
Uwe Krüger
5f95dd54bd
builtin: rename `any_*` -> `*_literal` - 2. part ( #8032 )
2021-01-11 22:58:15 +01:00
Uwe Krüger
91f87c03cf
all: rename `any_*` -> `*_literal` - 1. part ( #8031 )
2021-01-11 22:20:16 +01:00
Joe Conigliaro
70b921c49d
all: change any_int & any_flt display name
2021-01-04 03:20:52 +11:00
Nick Treleaven
e813583bc1
checker: support integer and voidptr key types for maps ( #7503 )
2020-12-27 14:18:46 +01:00
Swastik Baranwal
a3c3fd4d20
cgen: fix generation of array names in generic structs ( #7324 )
2020-12-15 02:52:20 +11:00
Daniel Däschle
7e3e30aa9c
ci: add a parser fuzzer step too ( #7288 )
2020-12-12 15:20:38 +02:00
Daniel Däschle
b76c91ec05
parser: silent mode fixes ( #7286 )
2020-12-12 13:52:22 +01:00
Daniel Däschle
11808f9fa3
parser: fix silent errors ( #7271 )
2020-12-12 04:06:09 +01:00
Daniel Däschle
8823430c71
parser: small fixes to make silent mod work with example/json ( #7246 )
2020-12-11 06:55:39 +01:00
Daniel Däschle
1f952330c4
parser: fix fn args eol errors ( #7222 )
2020-12-10 11:56:08 +02:00
joe-conigliaro
78a6795319
all: change the way import symbols work & support consts ( #7182 )
2020-12-07 19:13:03 +02:00
joe-conigliaro
a05408b49a
all: make type system use source name & cleanup storing name in fields
2020-12-06 14:55:08 +11:00
Daniel Däschle
47d0ed308d
parser: prepare for better VLS integration, more accurate parser errors ( #7119 )
2020-12-04 20:34:05 +02:00
joe-conigliaro
88835a0456
cgen: remove some nasty replacements
2020-12-01 21:17:19 +11:00
joe-conigliaro
ff63fb74d9
dont allow method on non-local types & no mod for arrays. closes #6971
2020-11-30 11:43:22 +11:00
joe-conigliaro
91eca539d0
all: -usecache fixes and self compilation & some type cname optimisation ( #7015 )
2020-11-29 14:10:45 +01:00
Daniel Däschle
9fbf38c798
parser: fix generic structs from other modules ( #6921 )
2020-11-23 23:21:11 +01:00
Delyan Angelov
2c3f695469
checker,parser: treat C.Struct fields as public by default
2020-11-03 09:35:44 +02:00
Alexander Medvednikov
2c75b1397c
all: struct embedding
2020-10-30 07:09:26 +01:00
Alexander Medvednikov
7da1afa140
all: switch to the new fn arg syntax everywhere; add lots of vfmt -verify tests
2020-10-15 12:32:28 +02:00
Delyan Angelov
c3626bf2e6
vfmt: prepare for using .source_name in type_to_str
2020-10-08 14:26:12 +03:00
Delyan Angelov
70826914a7
ci: fix mut_args_warning.vv error
2020-10-06 09:38:07 +03:00
Alexander Medvednikov
ed15b40529
parser: do not allow array references + explain why
2020-10-06 06:53:48 +02:00
Henrixounez
a57e01fee7
parser: dont allow single letter enums ( #6526 )
2020-10-01 23:29:49 +03:00
Alexander Medvednikov
fca344d1fb
all: fn args => params
2020-09-27 03:32:56 +02:00
Uwe Krüger
2cb711ee15
checker/channels: check `mut`/`&` state of transmitted objects ( #6315 )
2020-09-06 21:24:41 +02:00
Uwe Krüger
cbcba2e4cf
parser: enable module auto import (of `sync`) ( #6271 )
2020-08-31 10:44:39 +02:00
Uwe Krüger
c351f8fa47
checker, builtin: prepage for builtin channels ( #6262 )
2020-08-30 08:55:31 +02:00
Daniel Däschle
fcc61a981d
all: TypeSymbol.source_name ( #6187 )
2020-08-22 12:29:15 +02:00
Alexander Medvednikov
f965ddae49
parser: handle several errors in types; cgen: objC includes
2020-08-16 19:16:59 +02:00
Uwe Krüger
9602a25a0b
all: add builtin channel type `chan elem_type` ( #6126 )
2020-08-14 21:18:42 +02:00
Louis Schmieder
b58b15993c
gen: compile time for (methods and fields) ( #5957 )
2020-07-25 00:02:44 +02:00
Enzo
8a855ccae1
fmt,vet: handle `var in [single_value]` ( #5882 )
2020-07-19 19:58:34 +02:00
Enzo
90d9040e6e
all: make comment expressions + fix vfmt array init ( #5851 )
2020-07-17 19:13:22 +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
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
Uwe Krüger
3b067f5f85
all: experimental locked concurrency support, part 1 ( #5637 )
2020-07-04 12:44:25 +02:00
Delyan Angelov
78e1127d99
cgen: treat the main module like any other v module
2020-07-01 00:53:53 +02:00
joe-conigliaro
73da3c9e4c
generic structs: better naming & comments
2020-06-30 09:22:15 +10:00
joe-conigliaro
ab37dcaa9c
generic structs: initial implementation
2020-06-29 20:09:09 +02:00
Delyan Angelov
b6e6cde3e8
parser: disallow fns with type only args and a body
2020-06-29 10:21:01 +03:00
Adam Stankiewicz
b3fc462a78
scanner: fix parsing multiple .amp
2020-06-13 00:01:44 +02:00
Alexander Medvednikov
3bbda7103f
Revert "parser: allow void return type for C functions"
...
This reverts commit d7c63922d5
.
2020-06-07 19:06:19 +02:00
Swastik Baranwal
d7c63922d5
parser: allow void return type for C functions
2020-06-07 19:45:27 +03:00
Delyan Angelov
e534f8507b
vlib: minor tweaks for various module imports, needed for vdoc
2020-06-06 19:14:10 +03:00
yuyi
1386c5df13
parser: use `?` instead of `?void` errpr
2020-06-02 17:24:24 +02:00
Alexander Medvednikov
01dbb25a37
checker: do not allow defining methods on types from other modules
2020-05-28 15:23:20 +02:00
Alexander Medvednikov
5423a15f46
generics: more fixes
2020-05-27 15:56:30 +02:00
spaceface777
b10df252dc
all: replace `is_c`, `is_js` with `language`
2020-05-19 17:12:47 +02:00
yuyi
8500c8885c
cgen: fix optional_void error; handle `?` return type
2020-05-15 15:55:03 +02:00
yuyi
6d0b791ac8
parser: warning about unused imports
2020-05-14 17:14:24 +02:00
joe-conigliaro
1b3cd7abe0
cgen: fix sum type assign/push from in match branch & type mod
2020-05-11 16:59:55 +10:00
Ned Palacios
13b11a4155
parser: fix struct attribute for array struct field
2020-05-08 13:09:40 +02:00
yuyi
2f52106253
parser: use .next instead of .check, when a token is already known
2020-05-07 07:51:36 +03:00
Alexander Medvednikov
3ab8dc0092
parser: array init: `[]string` => `[]string{}`
2020-04-26 09:17:17 +02:00
yuyi
541b058e90
all: use `a !in b` instead of `!(a in b)`
2020-04-26 06:39:23 +02:00
joe-conigliaro
6696e1a6e2
table: move set_nr_muls to method
2020-04-25 17:54:32 +10:00
joe-conigliaro
fbcdffbbc8
table: move Type functions to methods
2020-04-25 17:08:53 +10:00
Kris Cherven
d871595437
all: replace `var` with `mut`
2020-04-23 01:16:58 +02:00
joe-conigliaro
abf5942433
parser/cgen: anon fn var & calling ( #4534 )
2020-04-21 13:23:36 +10:00
Alexander Medvednikov
4b5acfd960
parser: (var x X) receiver syntax
2020-04-16 15:40:21 +02: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
joe-conigliaro
c9e290b36f
table: simplify/generalise type fns & remove calls
2020-04-04 16:37:11 +11:00
Alexander Medvednikov
91ffeeb73b
parser: fix `(x mut &X)`
2020-04-01 23:56:55 +02:00
Alexander Medvednikov
956bf23390
memory fixes: 21% of V compiler leaks fixed
2020-03-31 14:33:16 +02:00
joe-conigliaro
837bffd03a
parser: parse type - fix multiple &
2020-03-29 01:15:10 +11:00
Joe Conigliaro
cf094c6265
cgen: gen fn type declerations
2020-03-16 20:12:03 +11:00
Joe Conigliaro
50ed4004f4
ast/table: use common struct fn decl arguments
2020-03-15 09:21:36 +11:00
Joe Conigliaro
a1314bd199
checker/gen/table: impl fn types & sum/other fixes & tidy
2020-03-12 02:10:46 +11:00
Alexander Medvednikov
754a6cc93e
cgen: fix ->
2020-03-08 19:38:27 +01:00
Joe Conigliaro
f67fca826e
v2: fix C function & type prefixing
2020-02-29 21:47:47 +11:00
Alexander Medvednikov
c51f464446
v2: fix `mod.Enum.val` and `x = .val`
2020-02-27 00:12:40 +01:00
joe-conigliaro
15c288b444
v2: small type cleanup
2020-02-22 08:50:21 +11:00
joe-conigliaro
8bb8b7d76e
v2: add ability to store extra information with Type such as optional
2020-02-21 21:44:06 +11:00
joe-conigliaro
fcd97f513a
v2: module/type/fn name fixes, compile fixes
2020-02-20 21:13:18 +11:00
Alexander Medvednikov
092c09d81f
vdoc using the new parser
2020-02-19 16:13:34 +01:00
joe-conigliaro
b62a90a212
v2: module/import fixes, use parent_idx instead of parent ptr to remove need to preallocate types array
2020-02-19 13:09:35 +11:00
joe-conigliaro
1007dd8f23
v2: update parse type not to prefix builtin types with module
2020-02-16 16:16:19 +01:00
Alexander Medvednikov
6d8ad58515
v2: mod.Type
2020-02-16 12:31:44 +01:00
joe-conigliaro
dc90f4f4a6
v2: remove unresolved types; handle types in checker; add ast.scope
2020-02-15 13:37:48 +01:00
Alexander Medvednikov
9d46fb9f90
v2: [] expr for known arrays; p.expected_type
2020-02-12 17:39:51 +01:00
Alexander Medvednikov
d9cf98f772
v2: imports
2020-02-12 01:16:38 +01:00
Alexander Medvednikov
17212f816c
v2: high order functions
2020-02-11 13:21:41 +01:00