1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

835 Commits

Author SHA1 Message Date
Ned Palacios
ce7da85166
parser: make .parse() public (#6693) 2020-10-29 07:10:45 +01:00
Delyan Angelov
8b01146b90 compiler: implement -W and -reuse-tmpc 2020-10-24 20:34:50 +03:00
Swastik Baranwal
019e3b2f4a
checker: add error for ast.PrefixExpr on the left side of decl_assign (#6660) 2020-10-21 17:37:30 +02:00
Enzo
21db4b338b
parser: clean error when nesting unsafe (#6656) 2020-10-20 22:57:24 +03:00
Alexander Medvednikov
37d6503437 parser: do not allow fn consts 2020-10-19 13:48:39 +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
Delyan Angelov
8d88b73512 parser: fix formatting 2020-10-16 17:47:23 +03:00
Delyan Angelov
140166e1cd interpolation: support '' (rounding like in C) 2020-10-16 17:28:11 +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
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
Alexander Medvednikov
982056894e fmt: use f(x int, y int) instead of f(x, y int) 2020-10-15 12:00:46 +02:00
Swastik Baranwal
314fae7446
checker: add more checks for hash_stmt (#6615) 2020-10-15 11:58:01 +03:00
Delyan Angelov
44a42b7273 ci: fix parser.v formatting 2020-10-15 11:41:43 +03:00
Delyan Angelov
6326b6d58e parser: add helper method p.trace/2 2020-10-15 11:09:19 +03:00
Delyan Angelov
c33a748344 vfmt: handle more comments in interface/struct init/match branches 2020-10-14 22:52:33 +03:00
Delyan Angelov
3c48a6e4ce tests: rename _test.v files with dup names (temp workaround for highly parallel testing) 2020-10-14 18:25:26 +03:00
Alexander Medvednikov
a07f31feae all: for mut val in vals { (part 1) 2020-10-13 16:27:30 +02:00
Delyan Angelov
e862fad917 parser: support mut static x := y in -translated mode 2020-10-09 22:24:21 +03:00
Delyan Angelov
c3626bf2e6 vfmt: prepare for using .source_name in type_to_str 2020-10-08 14:26:12 +03:00
Delyan Angelov
efce448b23 parser: always treat MainLetter(x) as a cast, even when the type is not yet known 2020-10-07 15:50:54 +03:00
Delyan Angelov
8e5067421f vet: accumulate the collected errors manually (fixes CI) 2020-10-06 10:02:35 +03:00
Delyan Angelov
70826914a7 ci: fix mut_args_warning.vv error 2020-10-06 09:38:07 +03:00
Alexander Medvednikov
256a572cbe vet: fix vet_errors 2020-10-06 07:07:50 +02:00
Alexander Medvednikov
ed15b40529 parser: do not allow array references + explain why 2020-10-06 06:53:48 +02:00
Alexander Medvednikov
d2d3289a2a all: mark pref.Preferences field as immutable 2020-10-06 06:24:50 +02:00
Enzo
fd88bfbac8
fmt: fix formatting of anon args (#6545) 2020-10-04 06:32:47 +02:00
Enzo
c84848c417
fmt: fix formatting enum with attributes (#6551) 2020-10-03 21:33:02 +03:00
Henrixounez
c324169af0
all: remove intermediate handling for both global definition syntaxes (#6546) 2020-10-03 15:41:45 +02:00
Swastik Baranwal
7e13518cc2
parser: disallow match expr at certain places (#6490) 2020-10-03 16:30:58 +03:00
Enzo
677b0ba2d2
gen: access fields in multi-type sumtype match (#6541) 2020-10-03 11:19:43 +02:00
Henrixounez
c9574ae7d7
syntax: new global variable declaration syntax (#6540) 2020-10-03 07:03:44 +02:00
Henrixounez
a57e01fee7
parser: dont allow single letter enums (#6526) 2020-10-01 23:29:49 +03:00
Enzo
324d547cdb
parser: allow multiple types in match branch (#6505) 2020-10-01 01:07:36 +02:00
Nick Treleaven
18be7b115a
checker: disallow most statements in if/match expression branches (#6509) 2020-09-30 16:06:22 +02:00
Delyan Angelov
dc954bbb03 all: use macos consistently in os.user_os and the compiler 2020-09-29 22:32:20 +03: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
Daniel Däschle
abc98c273c
parser: require assign on type alias (#6477) 2020-09-25 12:02:32 +02:00
Nick Treleaven
3925c3fa20
parser: disallow index variable with range for (#6464) 2020-09-24 15:52:44 +03:00
Alexander Medvednikov
624f22e27e all: mutability check (part 1); enable mutable sumtype args 2020-09-22 05:28:29 +02:00
Swastik Baranwal
077b597bd8
scanner/parser: change error msgs for \0 and \x00 and add error for rbyte and cbyte (#6436) 2020-09-21 17:34:24 +03:00
Uwe Krüger
0f1c484ad1
parser/checker: if select { ... } { (#6434) 2020-09-21 07:34:04 +02:00
Uwe Krüger
4ae88c69ac
sync/select: allow push of literals and calculated expressions (#6429) 2020-09-20 03:50:09 +02:00
Nick Treleaven
9958881cbe
parser: support parsing unsafe (as first token) as UnsafeExpr (#6032) 2020-09-19 19:18:36 +03:00
Henrixounez
4121ba9ea9
parser: fix error about multiple modules showing when eof (#6423) 2020-09-19 02:15:47 +02:00
Uwe Krüger
31a52cdf21
cgen: implement channel select block code generation (#6424) 2020-09-19 02:14:35 +02:00
Daniel Däschle
f59b771c76
parser: fix nested amp (#6402) 2020-09-18 01:04:56 +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