Commit Graph

282 Commits (f4c03e8ed82d29646f4de311e100efde2c049083)

Author SHA1 Message Date
Joe Conigliaro a50f2ca5e8
interfaces: error on implemention of own interface method & on duplicate normal methods 2021-03-03 15:02:10 +11:00
Nick Treleaven dc04c3196b
builder: fix detecting duplicate functions (#9033) 2021-03-01 21:38:31 +01:00
spaceface b9a381f101
all: migrate to the new Option (p. 1) (#8924) 2021-02-28 22:24:29 +03:00
Delyan Angelov bdce35fd9c
parser: support `static x := 42` in [unsafe] functions too 2021-02-28 14:32:46 +02:00
Delyan Angelov 1c0eefae38
parser/scanner: replace p.peek_tok2/3 with p.peek_token(2/3) (#8946) 2021-02-24 21:03:53 +03:00
yuyi c704a49283
parser: fix error of $tmpl in anon_fn (fix #8847) (#8849) 2021-02-20 18:51:08 +02:00
yuyi 783cee98d9
table/parser: minor optimization of anon_fn names (#8851) 2021-02-20 15:54:47 +02:00
Delyan Angelov bf6e9ff95a
Revert "parser: make duplicated functions an error (#8792)"
This reverts commit 21bf8fe14e.
2021-02-18 09:02:56 +02:00
zakuro 21bf8fe14e
parser: make duplicated functions an error (#8792) 2021-02-17 20:50:10 +01:00
zakuro 70a30374b9
parser: cleanup fn_decl (#8700) 2021-02-15 17:55:08 +02:00
Nick Treleaven 82650ee813
parser: fix parsing attribute after fn prototype with no return type (#8727) 2021-02-14 08:05:20 +01:00
yuyi 3164e29651
all: fix fn_or_for_in mut value (part 1) (#8671) 2021-02-12 02:03:11 +02:00
Nick Treleaven d37fb5641f
parser: improve printing of unexpected tokens (#8654) 2021-02-09 17:07:30 +02:00
Lukas Neubert cb1f63f765
parser: replace eat_line_end_comments() with configurable eat_comments() (#8636) 2021-02-08 18:16:02 +02:00
Swastik Baranwal e2ff26a066
cgen: fix gen of .sort method for `>` operator and improve grammar of error (#8615) 2021-02-08 17:19:54 +02:00
Lukas Neubert 7f4c582f1a
fmt: unwrap long infix exprs inside parenthesis if necessary (#8609) 2021-02-07 23:10:39 +01:00
Nick Treleaven f5f65f929f
parser: parse `map{key_expr: val_expr}` (#8608) 2021-02-06 22:13:24 +01:00
Uwe Krüger 5343f1374b
all: allow functions to return `shared` object (#8606) 2021-02-06 19:41:52 +01:00
Alexander Medvednikov fdd8c86fdb parser: make sure methods have names 2021-02-04 22:15:16 +01:00
Nick Treleaven de37b52d4b
checker: check goto label exists (#8523) 2021-02-03 15:20:10 +01:00
Swastik Baranwal 7ec116d588
all: only allow defining `==` and `<` and auto generate `!=`, `>`, `>=` and `<=` (#8520) 2021-02-03 15:18:38 +01:00
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