Uwe Krüger
8d014d4646
sync: allow `go` routine join with return value ( #8125 )
2021-01-15 13:45:26 +01:00
Larpon
f73500f2fe
all: add support for the `x := $embed_file('v.png')` compile time call ( #8048 )
2021-01-14 16:20:11 +02:00
yuyi
a2efb5319d
all: change `[1,2,3]!!` to `[1,2,3]!` ( #8101 )
2021-01-14 03:51:13 +01:00
Nick Treleaven
ac85257ea0
parser: fix sizeof(mod.Type), fix checking sizeof expression ( #8065 )
2021-01-13 06:13:39 +01:00
zakuro
33694665f0
fmt: align each contiguous field of struct. not the whole. ( #7981 )
2021-01-12 04:38:43 +01:00
Lukas Neubert
5d6e9f7bf9
fmt: fix rare extra tab after a SumType ( #8035 )
2021-01-11 22:19:42 +01:00
Lukas Neubert
e79695e8fc
fmt: keep comments after call_expr in vscript ( #7990 )
2021-01-09 22:47:33 +01:00
Ned Palacios
256ddcee1f
v.ast: add walker submodule for ast walking ( #7775 )
2021-01-09 05:36:38 +01:00
Nick Treleaven
141b0cb882
checker: fix warning & allow assigning to a union field without unsafe ( #7970 )
2021-01-09 01:32:33 +01:00
Uwe Krüger
cbe7740d97
fmt: do not generate `import` statements for auto imports ( #7966 )
2021-01-08 17:42:40 +01:00
Delyan Angelov
46a5c487c1
parser,fmt: implement `[manualfree] module abc` for opting out *all* fns in a given .v from autofree
2021-01-08 17:24:42 +02:00
Delyan Angelov
083dc23db8
gen: implement a `[manualfree]` tag, for functions, that want to do their own memory management
2021-01-08 16:22:27 +02:00
Daniel Däschle
88d18f3303
checker: smartcast in for loops ( #7942 )
2021-01-07 21:35:32 +01:00
Nick Treleaven
cbefe6c32f
parser: warn about old use of `typeof` ( #7923 )
2021-01-07 20:32:02 +01:00
Uwe Krüger
ffd753abdc
all: implement `ch <- x or {...}` and `ch <- x ?` ( #7928 )
2021-01-06 21:19:40 +01:00
Nick Treleaven
3203a124b2
checker: warn when casting between reference types outside of `unsafe` ( #7892 )
2021-01-05 17:02:04 +02:00
Daniel Däschle
5841d5d8e1
all: implement basic comptime field selector ( #7888 )
2021-01-05 16:11:43 +02:00
Daniel Däschle
7c9fb73b3f
vfmt: fix comments before ...f in Abc{...f} ( #7870 )
2021-01-04 21:01:35 +02:00
Daniel Däschle
164d7bf5fb
parser: struct updating syntax with `Abc{...oldabc newfield: val}` ( #7865 )
2021-01-04 20:19:03 +02:00
zakuro
dd516858d4
fmt: align struct field comments ( #7632 )
2021-01-03 21:10:25 +01:00
Swastik Baranwal
a9ab79d301
checker: ban any_int/any_float outside buitlin ( #7675 )
2020-12-31 12:41:30 +01:00
lydiandy
20f507651e
v.ast: remove unused path and expr fields in Module ( #7625 )
2020-12-31 12:17:59 +02:00
Alexander Medvednikov
ad78875a8c
parser: allow `const x = 0` consts outside of const blocks
2020-12-30 02:15:44 +01:00
joe-conigliaro
02965e753e
all: re-implement variadics using arrays & implement array decomposition to varg ( #7689 )
2020-12-29 16:14:08 +01:00
Lukas Neubert
2360762a42
fmt: fix unexpected `comment`, expecting struct key for trailing arg syntax ( #7658 )
2020-12-28 20:26:24 +02:00
Lukas Neubert
4783503185
fmt: keep interface comments between methods ( #7650 )
2020-12-28 18:14:55 +02:00
lydiandy
ecc7c27c9c
v.ast: document vlib/v/ast/ast.v ( #7624 )
2020-12-28 13:52:04 +02:00
Lukas Neubert
e7ca5dd17a
fmt: update expr_is_single_line for MatchExpr, StructInit and CallExpr with or block ( #7564 )
2020-12-25 21:43:50 +02:00
Lukas Neubert
2c0fba5480
fmt: keep comment between enum fields ( #7566 )
2020-12-25 21:41:59 +02:00
spaceface
214290d55b
fmt: add a space around single-line `unsafe` expressions ( #7505 )
2020-12-23 19:13:42 +01:00
Daniel Däschle
b27f5c378c
all: reimplement struct embedding with methods ( #7506 )
2020-12-23 19:12:49 +01:00
Alexander Medvednikov
1f74f83bc6
parser: map or block; checker: require ref field init
2020-12-19 10:28:17 +01:00
joe-conigliaro
0aa9f5a007
all: optimize scope usage in checker & parser. store scope in ast nodes ( #7281 )
2020-12-12 19:01:12 +11:00
Lukas Neubert
25153490e1
fmt: keep comments after assign on same line ( #7269 )
2020-12-11 19:20:24 +02:00
spaceface777
ca2c082a5e
checker: initial support for evaluating expressions at compile time ( #7248 )
2020-12-11 04:46:06 +01:00
Daniel Däschle
0bf679a7aa
checker: correct underline for unknown type in method type ( #7223 )
2020-12-10 11:51:22 +02:00
Daniel Däschle
a38fe4fca9
checker: fix smartcast inside smartcast ( #7215 )
2020-12-10 00:59:39 +01:00
Lukas Neubert
3b6b5b8090
vfmt: properly parse comments on lines after init fields ( #7202 )
2020-12-09 11:11:22 +02:00
joe-conigliaro
78a6795319
all: change the way import symbols work & support consts ( #7182 )
2020-12-07 19:13:03 +02:00
Alexander Medvednikov
8eff8b0eff
autofree: fix `for` args
2020-12-06 08:38:21 +01:00
Alexander Medvednikov
b6ae81032f
ast: Var.is_tmp field
2020-12-06 08:19:17 +01:00
joe-conigliaro
7733834751
parser/cgen: autofree - move branch_parent_pos to cgen.
2020-12-06 18:02:36 +11:00
Delyan Angelov
946a1418fe
Revert "autofree: handle tmp vars in for loops"
...
This reverts commit 1d6c604664
.
2020-12-05 21:52:50 +02:00
Alexander Medvednikov
1d6c604664
autofree: handle tmp vars in for loops
2020-12-05 20:11:31 +01:00
joe-conigliaro
83f651c29a
cgen: autofree - know where to stop freeing parent scops on continue/break
2020-12-06 02:36:27 +11:00
Alexander Medvednikov
0ea2fa228f
autofree: fix `or {}`; ci: bring back gitly -autofree
2020-12-04 18:06:53 +01:00
joe-conigliaro
f1965c0510
ast: fmt ast.v
2020-12-01 21:20:27 +11:00
joe-conigliaro
9b583f51f1
ast: remove field which should have been removed in #34e124d
2020-12-01 20:15:35 +11:00
joe-conigliaro
34e124d5f7
cgen: auto cast sum type in array init. fixes #6907
2020-12-01 20:03:45 +11:00
joe-conigliaro
a7d917474d
checker: simplify generic fn post processing
2020-12-01 16:43:10 +11:00
Daniel Däschle
32c027a0bf
parser: disallow ptr type as sum type variant ( #6996 )
2020-11-28 23:40:40 +02:00
Daniel Däschle
6e4dad9acf
parser: fix position of array init ( #6998 )
2020-11-28 17:05:14 +02:00
Daniel Däschle
966b95ca4e
parser: move mut in if/match to expr ( #6973 )
2020-11-27 03:08:42 +01:00
Daniel Däschle
7d6f97259f
all: refactor UnionSumType to SumType ( #6944 )
2020-11-25 13:09:40 +02:00
Daniel Däschle
a042966082
all: remove old sumtype code ( #6937 )
2020-11-24 17:55:24 +01:00
Daniel Däschle
aa6303f0b2
all: use the new types with old syntax ( #6922 )
2020-11-24 13:58:29 +01:00
Daniel Däschle
96539e43b5
all: nested sum types ( #6913 )
2020-11-23 16:16:13 +01:00
Swastik Baranwal
650cdef8b4
checker: disallow array sum types without default field ( #6892 )
2020-11-21 00:07:25 +01:00
Daniel Däschle
838ad16296
all: refactor ast.Expr to use the new sum type implementation ( #6792 )
2020-11-21 00:05:57 +01:00
Nick Treleaven
d5242e0bf5
gen: implement labelled break and continue (retry) ( #6887 )
2020-11-20 12:23:48 +01:00
Lukas Neubert
ef3e8d2c84
vfmt: handle comments after type declarations ( #6874 )
2020-11-20 11:51:50 +02:00
Alexander Medvednikov
4328233504
Revert "gen: implement labelled break and continue ( #6880 )"
...
This reverts commit e798326a1a
.
2020-11-20 02:51:35 +01:00
Nick Treleaven
e798326a1a
gen: implement labelled break and continue ( #6880 )
2020-11-19 21:13:15 +01:00
Daniel Däschle
9feb010355
all: mutable smartcasts ( #6878 )
2020-11-19 17:28:46 +01:00
Delyan Angelov
f995aa35ea
checker: add a check for `x := math.sin<f64>(0)`
2020-11-15 11:51:12 +02:00
Nick Treleaven
50163508f8
gen: implement type_name method for sum type instances ( #6802 )
2020-11-14 13:59:03 +02:00
Delyan Angelov
f42a44abec
vfmt: fix `match x { 10 /* ... */ {} }` and `a := [1/* x */, /* y */2, 3]`
2020-11-11 22:59:43 +02:00
Delyan Angelov
ebfd259333
vfmt: support `struct Repo <T, U> { }`
2020-11-11 17:50:03 +02:00
Daniel Däschle
6271798ce3
cgen: union sum types implementation ( #6745 )
2020-11-11 09:18:15 +01:00
Nick Treleaven
c76e486765
parser: implement `T.name` for generic types ( #6783 )
2020-11-09 14:35:26 +01:00
Alexander Medvednikov
1c257abc23
autofree: simplify: merge tmp arg logic with scope vars
2020-11-09 14:24:46 +01:00
pancake
2994e7150f
vweb: check function and route parameter count ( #6761 )
2020-11-08 09:14:24 +01:00
Delyan Angelov
e80487b35c
vfmt: support inline comments before fields in struct initializations
2020-11-05 18:49:52 +02:00
Delyan Angelov
35096cda3f
vfmt: support comments after interface methods
2020-11-05 18:23:45 +02:00
Larpon
785bf40f67
all: remove comp time '@' expansion from scanner ( #6746 )
2020-11-05 10:12:32 +02:00
Delyan Angelov
9eb655e65c
all: add .pos fields to all AST nodes, to avoid wrong positions in error messages
2020-11-04 13:34:12 +02:00
Delyan Angelov
70cbf56655
cgen: show more informative errors, instead of a `invalid type (typ=0 idx=0)` verror panic
2020-10-30 20:26:08 +02:00
Alexander Medvednikov
2c75b1397c
all: struct embedding
2020-10-30 07:09:26 +01:00
Ned Palacios
ccc0cb23ed
doc: store source content, restructure module directory ( #6692 )
2020-10-29 17:21:37 +01:00
Alexander Medvednikov
f19ca6b411
autofree: simplify, use more scoping, fix expressions inside or blocks
2020-10-29 01:09:38 +01:00
Alexander Medvednikov
66b8462d7a
autofree: handle method chains
2020-10-22 03:51:28 +02:00
Delyan Angelov
ab137e4164
cgen: print results of failed callexprs in `assert fn() == fn2()` ( #6665 )
2020-10-21 21:58:40 +02:00
Delyan Angelov
3c2202572b
cgen: produce cleaner error on missing C headers (with optional explanation) ( #6637 )
...
Implements support for `#include <openssl/rand.h> # Please install OpenSSL`.
2020-10-17 18:27:06 +03:00
Enzo
b083f4014b
fmt: fix multiple things and format most of the compiler ( #6631 )
...
Format expressions inside string interpolation like the rest (it used to be a+b instead of a + b, not too sure why)
Fix formatting some match branches when there were only one statement inside (it was inlined)
Fix parsing and formatting some comments edge case on struct field init. You should check out this test because the result is a bit different from before. I personally find it more logical but I would understand if the former format was to stay
Fix formatting of void-returning function signature
2020-10-15 22:12:59 +02:00
Swastik Baranwal
314fae7446
checker: add more checks for hash_stmt ( #6615 )
2020-10-15 11:58:01 +03:00
Delyan Angelov
c33a748344
vfmt: handle more comments in interface/struct init/match branches
2020-10-14 22:52:33 +03:00
Alexander Medvednikov
25947a7b23
autofree: handle args in optional returns
2020-10-14 13:23:58 +02:00
Alexander Medvednikov
a07f31feae
all: `for mut val in vals {` (part 1)
2020-10-13 16:27:30 +02:00
JalonSolov
57d705e265
ast: minor code cleanup ( #6608 )
2020-10-12 23:11:51 +02:00
Swastik Baranwal
d77669da80
test: add tests for disallowing map/array get element/key address ( #6568 )
2020-10-05 18:40:51 +03:00
Enzo
c84848c417
fmt: fix formatting enum with attributes ( #6551 )
2020-10-03 21:33:02 +03:00
Henrixounez
c9574ae7d7
syntax: new global variable declaration syntax ( #6540 )
2020-10-03 07:03:44 +02:00
Nick Treleaven
18be7b115a
checker: disallow most statements in if/match expression branches ( #6509 )
2020-09-30 16:06:22 +02:00
Nick Treleaven
9f33b33803
parser: warn about ambiguous infix/prefix op token ( #6491 )
2020-09-29 03:13:10 +02:00
Alexander Medvednikov
fca344d1fb
all: fn args => params
2020-09-27 03:32:56 +02:00
Alexander Medvednikov
e2c7126d11
checker: verify mutability of method args
2020-09-27 03:14:24 +02:00
Alexander Medvednikov
624f22e27e
all: mutability check (part 1); enable mutable sumtype args
2020-09-22 05:28:29 +02:00
Nick Treleaven
9958881cbe
parser: support parsing unsafe (as first token) as UnsafeExpr ( #6032 )
2020-09-19 19:18:36 +03:00
Uwe Krüger
31a52cdf21
cgen: implement channel `select` block code generation ( #6424 )
2020-09-19 02:14:35 +02:00
Nick Treleaven
14743458e5
checker: tweak error messages for `or` block; use proper type names ( #6377 )
2020-09-18 01:09:00 +02:00
Enzo
a1e127ae46
checker: check type in `is` InfixExpr ( #6407 )
2020-09-18 01:01:05 +02:00
spaceface777
ff92c3409d
ast: merge `IfExpr` and `CompIf` ( #6011 )
2020-09-18 00:58:54 +02:00
Uwe Krüger
1bc9063573
parser: implement parsing of `select` block ( #6379 )
2020-09-16 15:34:57 +02:00
Alexander Medvednikov
db51ee08ea
autofree: more fixes in optionals
2020-09-13 03:00:45 +02:00
Alexander Medvednikov
b74c1805d7
cgen/autofree: fix and simplify optionals
2020-09-12 16:40:52 +02:00
Daniel Däschle
ce62f997f3
all: better type error positions ( #6345 )
2020-09-11 14:37:14 +02:00
Nick Treleaven
eb95a4333a
table: rename Arg to Param ( #6337 )
2020-09-09 13:21:11 +02:00
Nick Treleaven
49c322f120
checker: simplify argument qualifier errors ( #6321 )
2020-09-08 19:34:17 +02:00
Alexander Medvednikov
9fbea31f47
autofree: fix exprs N levels deep
2020-09-06 13:02:32 +02:00
Alexander Medvednikov
3410705974
autofree: lots of fixes
2020-09-05 12:00:35 +02:00
spaceface777
d663f57d43
parser: move flag logic to checker ( #6239 )
2020-08-28 09:24:04 +03:00
Delyan Angelov
7476428def
vfmt: handle comments after last const field
2020-08-27 15:07:49 +03:00
Nick Treleaven
479bfa28de
cgen: implement fixed array `.len` property ( #6212 )
2020-08-25 08:48:28 +02:00
Maciej Obarski
e8e0d9fa42
all: [direct_array_access] tag ( #6203 )
2020-08-24 09:04:50 +02:00
Uwe Krüger
61df70fdf5
all: enable `x = <-ch or {...}` ( #6195 )
2020-08-23 02:12:05 +02:00
Nick Treleaven
1b914d217e
fmt: don't remove `mut` from `if mut` smart cast ( #6188 )
2020-08-22 00:00:02 +02:00
Uwe Krüger
0d7cc8829a
cgen: implement channel `push()`/`pop()` using `<-` operator ( #6154 )
2020-08-17 23:35:36 +02:00
Nick Treleaven
36c98b3e5d
cgen: implement fixed array 'for in' for lvalue condition ( #6151 )
2020-08-17 21:10:47 +02:00
Nick Treleaven
0f0a91fc9e
parser: support custom fixed size ArrayInit: `[3]int{init: -1}` ( #6114 )
2020-08-15 11:01:54 +02:00
Uwe Krüger
9602a25a0b
all: add builtin channel type `chan elem_type` ( #6126 )
2020-08-14 21:18:42 +02:00
Nick Treleaven
6016f28171
cgen: fix assigning ArrayInit to fixed array: `a = [3]int` ( #6115 )
2020-08-14 13:57:00 +02:00
Alexander Medvednikov
4bc0dde413
all: new `.sort(a < b)` syntax
2020-08-12 05:54:51 +02:00
Delyan Angelov
36eae1c175
builtin: x.vstring() instead of string(x) ( #6102 )
2020-08-10 18:05:26 +02:00
Enzo
f238890fe9
compiler: move attributes to declarations ( #6026 )
2020-08-04 20:10:22 +02:00
Delyan Angelov
e291c38119
ast: add use case comment for MatchExpr.var_name
2020-08-03 22:10:59 +03:00
Nick Treleaven
7f447bb82f
ast: use Block instead of UnsafeStmt ( #5981 )
2020-08-02 14:06:44 +03:00
Swastik Baranwal
d56d622a43
checker: add checks for byte casting ( #5917 )
2020-08-01 23:17:00 +02:00
Alexander Medvednikov
f269cbdc94
Revert "parser: Support `unsafe(expr)` ( #5973 )"
...
This reverts commit 19c226fcf8
.
2020-07-29 21:41:47 +02:00
Delyan Angelov
9c9533dad9
checker: add error for `fn f() Struct { return &Struct{} }` ( #6019 )
2020-07-29 21:40:43 +02:00
Nick Treleaven
19c226fcf8
parser: Support `unsafe(expr)` ( #5973 )
2020-07-28 11:20:52 +03:00
Louis Schmieder
b58b15993c
gen: compile time for (methods and fields) ( #5957 )
2020-07-25 00:02:44 +02: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
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
Ryan Willis
1114fd28d0
all: import individual symbols feature ( #5872 )
2020-07-18 21:34:38 +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
Enzo
d301611de7
fmt: interface decl fixes ( #5829 )
2020-07-14 18:52:28 +02:00
joe-conigliaro
042add0e7f
ast: fix typo in comment
2020-07-14 04:04:16 +10:00
joe-conigliaro
dd06d90466
checker/gen: temp hack for struct fn type field (fixes ui)
2020-07-14 03:59:00 +10:00
Uwe Krüger
6e6010d198
checker, cgen: implement auto-lock for `a[i]++`, `a[i]--` ( #5817 )
2020-07-13 15:01:32 +03:00
Uwe Krüger
aa364ddaca
checker, cgen: checks for shared/lock, first autolock ( #5815 )
2020-07-13 12:19:28 +02:00
Nick Treleaven
53023c1ca9
all: add UnsafeExpr ( #5793 )
2020-07-12 12:58:33 +02:00
Emily Hudson
7488dd829d
all: _allow_multiple_values enum attribute ( #5772 )
2020-07-10 16:43:02 +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
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
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
joe-conigliaro
5fd5e558ae
parser/checker/gen: anon fn direct call with args
2020-07-08 01:10:39 +10:00
Uwe Krüger
ef02373061
all: remove `rwshared` keyword, make its semantics default for `shared` ( #5710 )
2020-07-07 01:57:31 +02:00
Alexander Medvednikov
188bad4f38
vfmt: handle string attrs
2020-07-04 23:38:28 +02:00
Delyan Angelov
5b93b4f37d
vfmt: allow multiple comments after if branches
2020-07-04 16:13:58 +03:00
Uwe Krüger
3b067f5f85
all: experimental locked concurrency support, part 1 ( #5637 )
2020-07-04 12:44:25 +02:00
Alexander Medvednikov
b7175b54eb
vweb: ['/:arg1/:arg2/action'] attribute
2020-07-03 15:10:39 +02:00
Louis Schmieder
b89cbf3224
orm: add support for ordering ( #5624 )
2020-07-02 20:29:22 +03:00
Delyan Angelov
132170f54c
vfmt: handle comments in enum Abc{} and after match branches
2020-07-02 16:51:09 +03:00
Alexander Medvednikov
2716a37916
ci: fix v vet call; fmt: fix SizeOf
2020-07-01 20:07:33 +02:00
yuyi
2f614ad79f
parser: optimize cross assign using expr.str() ( #5604 )
2020-07-01 16:43:13 +02:00
yuyi
6c5b638202
parser: fix array cross assign ( fix #5577 ) ( #5591 )
2020-07-01 12:11:03 +02:00
Delyan Angelov
78e1127d99
cgen: treat the main module like any other v module
2020-07-01 00:53:53 +02:00
Alexander Medvednikov
f073ffa4ad
orm: limit
2020-06-27 16:19:12 +02:00
Alexander Medvednikov
328cb7ed7e
orm: `update` with selectors and other fixes
2020-06-25 22:23:19 +02:00
Alexander Medvednikov
b280e08ee0
orm: `update` cgen
2020-06-25 17:12:32 +02:00
Alexander Medvednikov
a8b0dfb38a
checker: allow casting strings to string aliases
2020-06-25 14:55:53 +02:00
Alexander Medvednikov
afa5a134b7
orm: move fields fetching to a separate function to remove copy pasta
2020-06-25 14:43:25 +02:00
Alexander Medvednikov
786be1d1c3
orm: move type logic to checker, so that sql queries can be used before type def
2020-06-25 12:05:24 +02:00
Alexander Medvednikov
090e6e936a
orm: SqlStmt
2020-06-24 14:32:17 +02:00
Daniel Däschle
852fca2151
all: call anon fns right away
2020-06-24 12:54:39 +02:00
ka-weihe
4e447db883
parser/fmt: fix comments in structs/consts
2020-06-23 18:01:56 +02:00
Alexander Medvednikov
deb09d95b0
orm: fix `column == var`; limit 1; vweb: @footer
2020-06-22 16:52:16 +02:00
Alexander Medvednikov
011e26ca9a
checker: check sum types in `match`; cross compilation fixes; orm fixes
2020-06-21 23:09:53 +02:00
Alexander Medvednikov
1d8d19c977
vweb: return $vweb.html()
2020-06-20 03:12:38 +02:00
Alexander Medvednikov
3cfeb92a4e
cgen: fix tmp counter; orm: insert fixes
2020-06-19 17:05:57 +02:00
Alexander Medvednikov
cd8392e42d
orm: insert
2020-06-19 16:43:35 +02:00
Alexander Medvednikov
d04554f0b7
all: more match updates
2020-06-19 11:46:08 +02:00
joe-conigliaro
68143b7b22
parser/checker/gen: match shaddow cond var & as support: p1
2020-06-19 00:33:16 +10:00
Alexander Medvednikov
a602673adb
x64: pass variables to functions
2020-06-17 20:18:51 +02:00
Alexander Medvednikov
6066414afa
orm: select many
2020-06-17 14:18:32 +02:00
joe-conigliaro
effa0061e8
parser: fix incorrect duplicate struct attr error
2020-06-17 20:27:51 +10:00
Alexander Medvednikov
fb5cae7376
orm: select where id = x
2020-06-17 04:05:20 +02:00
Alexander Medvednikov
ed58192e4c
v orm: select
2020-06-17 00:59:37 +02:00
joe-conigliaro
d478b44915
parser/checker/gen: merge AssignExpr & AssignStmt into just AssignStmt
2020-06-16 21:20:16 +10:00
Alexander Medvednikov
e8f8defc3e
ast: SqlExpr
2020-06-16 12:14:22 +02:00
Uwe Krüger
f2d9fa3815
cgen: restructure string_inter_literal()
2020-06-16 10:41:51 +02:00
joe-conigliaro
0cd9066f44
parser/cgen: multiple attributes & better errors ( closes #5334 )
2020-06-15 22:59:09 +10:00
yuyi
2785a5bf65
checker: check return_duplicate_with_none ( closes #5363 )
2020-06-15 15:10:45 +10:00
Delyan Angelov
5ef9569098
cmd/tools: add check_os_api_parity.v - keep module APIs even
2020-06-11 21:13:36 +03:00
Delyan Angelov
4fc41c4bc4
v: add compiler support for _unlikely_(x) too
2020-06-09 18:11:03 +03:00
Delyan Angelov
c7d4360931
v: add full compiler support for _likely_(x)
2020-06-09 17:42:43 +03:00
Enzo Baldisserri
11b7b97311
parser: fail when assigning to _ with :=
2020-06-08 00:47:04 +02:00
joe-conigliaro
1c2bf7b244
vweb: impl of comptime tmpl parsing (fix vweb_example)
2020-06-07 20:26:45 +10:00
Alexander Medvednikov
4d5ac1e16d
vweb: $html
2020-06-06 21:36:34 +02:00
Alexander Medvednikov
2770077cb0
fmt: x.foo!() experiment
2020-06-06 16:05:24 +02:00
Alexander Medvednikov
40bd1be85f
parser: fix !
2020-06-06 12:43:35 +02:00
Alexander Medvednikov
7815c5b108
cgen: $action (ComptimeCall); vweb: hello world works!
2020-06-06 10:05:26 +02:00
Alexander Medvednikov
138d730dfa
checker: prepare for the is_changed check
2020-06-02 09:00:51 +02:00
Alexander Medvednikov
f87e872fa2
checker/cgen: interface match
2020-05-31 10:22:21 +02:00
yuyi
977eb895e8
checker: check array init's element type
2020-05-28 13:32:12 +02:00
Alexander Medvednikov
6f7628cb67
parser: comptime call fixes
2020-05-27 03:20:25 +02:00
yuyi
bb48851092
cgen: fix mutliple_assign swap
2020-05-26 18:00:51 +02:00
Delyan Angelov
b0cfd3fa67
parser: reimplement [flag] enum support. Add p.vcodegen too
2020-05-26 00:00:48 +03:00
Alexander Medvednikov
1ef8eacd6e
checker/gen: more generics fixes; ComptimeCall
2020-05-25 05:32:36 +02:00
Delyan Angelov
70f0115e27
options: use panic_debug() for opt()? calls in main with -cg
2020-05-23 11:43:20 +03:00
Enzo Baldisserri
801bca1ef2
compiler: propagate optional
2020-05-23 08:51:15 +02:00
Enzo Baldisserri
1633675c11
gen: fix nested `or`
2020-05-21 22:35:43 +02:00
Alexander Medvednikov
ce1a181699
all: generic functions
2020-05-21 03:58:53 +02:00
spaceface777
b10df252dc
all: replace `is_c`, `is_js` with `language`
2020-05-19 17:12:47 +02:00
Alexander Medvednikov
b1bf5f0edc
vfmt: wrap long sum type definitions
2020-05-18 18:08:32 +02:00
Alexander Medvednikov
5c0c418818
ast: vfmt ast.v
2020-05-18 18:06:09 +02:00
Enzo Baldisserri
f44a40eee0
checker: check incorrect names
2020-05-16 16:12:23 +02:00
Tanel Liiv
44502a3fb2
parser: return multi expr
2020-05-15 23:14:53 +02:00
Alexander Medvednikov
33a9822548
parser/vfmt: handle array len and default in array init
2020-05-13 16:11:52 +02:00
Alexander Medvednikov
1c8e14c77c
vfmt: handle comments in const blocks
2020-05-12 00:09:59 +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
5f0ad0f562
compiler: add output mode for errors and warnings, support for `-silent` flag
2020-05-10 12:26:57 +03:00
Alexander Medvednikov
09f6cd6a75
parser/checker: [ref_only] attribute
2020-05-09 23:45:41 +02:00
Alexander Medvednikov
c64f8b0d1f
parser/checker: pub: struct fields
2020-05-09 15:16:48 +02:00
Ned Palacios
5b47ec49af
parser: add support for multiple struct field attributes
2020-05-08 15:09:42 +02:00
Enzo Baldisserri
0f8ed84333
checker: verify interface is not used as receiver
2020-05-07 11:14:51 +03:00
Delyan Angelov
f638caef39
compiler: v -autofree can now compile itself
2020-05-06 19:03:51 +03: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
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
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
Delyan Angelov
adb8fb1dc6
comptime: fix custom -d flags and `$if x? {}`. Fixes ftp_test.v .
2020-04-23 17:52:44 +03:00
Alexander Medvednikov
d7ee4755c2
parser/cgen: interfaces (part 1)
2020-04-22 20:23:53 +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
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
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