Commit Graph

261 Commits (9dcf6732164003a8a66d69b23f6d10414dedb621)

Author SHA1 Message Date
Lukas Neubert ea06966fd4
fmt: hide ´[]Type{} instead of []Type´ and ´(f mut Foo)´ warnings (#8528) 2021-02-03 11:25:08 +02: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
Nick Treleaven 58a76344cb
checker: avoid SelectorExpr filter on Ident unless it's a generic type name (#8357) 2021-01-27 13:52:52 +01:00
zakuro 3959ba5751
checker: make a calling no-body function a checker error (#8265) 2021-01-26 11:19:48 +01:00
Lukas Neubert 8b61891348
fmt: smarter if condition wrapping (#8201) 2021-01-23 10:33:22 +02:00
Daniel Däschle 500ebf77e4
all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
Nick Treleaven 72168cd6bc
parser: support `mut:` section in the interface methods, and a mut interface fn modifier (#8092) 2021-01-22 10:02:28 +02:00
zakuro 1b09954622
parser: improve the position of mut receiver warning / error (#8240) 2021-01-22 09:38:37 +02:00
zakuro 522d875489
checker: make it an error, to use ident outside of anon fn (#8232) 2021-01-22 09:24:49 +02:00
zakuro 0c249fa040
parser: improve anon fn pos (#8210) 2021-01-21 11:01:40 +01:00
joe-conigliaro 97ebecc5f4
usecache: get all tests running with -usecache enabled by default (p.1) (#7699) 2021-01-20 06:04:59 +01:00
Tim Basel 129eee346b
fmt: keep single empty lines (#8189) 2021-01-19 14:49:40 +01:00
Lukas Neubert ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Nick Treleaven 5185a59ac7
parser: use Parser.builtin_mod instead of checking p.mod (#8137) 2021-01-17 05:31:41 +01:00
Nick Treleaven 8ee67d1c1c
parser: disallow indexing on next line at top-level (#8128) 2021-01-17 05:30:41 +01:00
Swastik Baranwal ef627c9d21
checker: improve message and positioning for operator overloading (#8133) 2021-01-17 03:37:44 +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
Ruofan XU 245ed9160a
gen: fix `mut arr [3]int` as a fn argument (#8085) 2021-01-13 15:52:46 +02:00
Swastik Baranwal 1f5255c2bb
cgen: implement `>=` and `<=` (#7991) 2021-01-10 12:24:46 +02:00
Daniel Däschle a8dd13f086
parser: change array decompose syntax (#7965) 2021-01-09 22:48:23 +01:00
Lukas Neubert e79695e8fc
fmt: keep comments after call_expr in vscript (#7990) 2021-01-09 22:47:33 +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
Nick Treleaven c0e56d10c3
parser: add errors for invalid anonymous function (#7786) 2021-01-05 01:32:24 +01:00
Swastik Baranwal 9033099676
cgen: implement overriding of `!=` and `==` (#7837) 2021-01-03 16:19:02 +01:00
zakuro 6bd35505a2
parser: fix error when using imported types in short fn signature (#7795) 2021-01-02 15:09:54 +02:00
Swastik Baranwal 24b18f05c4
cgen: implement > and < for structs (#7774) 2021-01-01 14:54:32 +01:00
yuyi c3dafad7ef
generics: implement method generics (fix #7638) (#7732) 2020-12-31 18:00:22 +01:00
Daniel Däschle 3ee3c8b3ed
parser: proper error on fn decl in script mode (#7680) 2020-12-30 21:18:36 +02: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 06fdf34214
fmt: unwrap long single line ifs (#7608) 2020-12-27 14:20:30 +01:00
Lukas Neubert 0caf668e73
parser: error if operators are used as function names (#7532) 2020-12-24 13:38:11 +02:00
yuyi 7b9756be72
parser: check for builtin function redefinitions (fix #7499) (#7507) 2020-12-23 18:17:09 +02:00
Delyan Angelov 2c4a51a596 parser: use `v fmt -w "$p.scanner.file_path"` in warns, easing fixing 2020-12-23 14:17:20 +02:00
Lukas Neubert d1fc65c260
parser: add information about the ending line for a few elements (#7414) 2020-12-22 14:45:12 +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
joe-conigliaro d1224ffb5a
parser: error on non local array/map methods & add tests 2020-12-11 20:50:26 +11: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
Enzo 04346e7ba5
checker: allow void,char,byteptr to be mut args (#7239) 2020-12-11 04:47:10 +01:00
Daniel Däschle f6a2dba7ff
parser: refactor args count error (#7238) 2020-12-10 16:42:30 +02:00
Daniel Däschle 1f952330c4
parser: fix fn args eol errors (#7222) 2020-12-10 11:56:08 +02:00
Daniel Däschle 0bf679a7aa
checker: correct underline for unknown type in method type (#7223) 2020-12-10 11:51:22 +02:00
Delyan Angelov d5915bde7c
parser: implement support for -Wimpure-v (#7195) 2020-12-08 17:52:24 +01:00
Leah Lundqvist 90c1c639fe
js: types (#7108) 2020-12-08 17:49:20 +01: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