Commit Graph

235 Commits (9f74be4cf6a90eee84d98c541f134a2f51708dfa)

Author SHA1 Message Date
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
Daniel Däschle 47d0ed308d
parser: prepare for better VLS integration, more accurate parser errors (#7119) 2020-12-04 20:34:05 +02:00
Daniel Däschle 558a756431
parser: fix position offset by 1 (#7099) 2020-12-03 11:25:06 +02:00
Lukas Neubert 2691163a7e
scope: remove redundant name arg from register() (#7077) 2020-12-02 14:40:25 +01: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
Delyan Angelov e6116c47be scanner: guarantee an early exit when the parser/scanner is stuck 2020-11-27 12:44:39 +02: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
Delyan Angelov f995aa35ea checker: add a check for `x := math.sin<f64>(0)` 2020-11-15 11:51:12 +02:00
pancake 2994e7150f
vweb: check function and route parameter count (#6761) 2020-11-08 09:14:24 +01:00
Daniel Däschle a2fc19880a
parser: fixes or block position (#6736) 2020-11-04 16:02:01 +02:00
Delyan Angelov e72d9c0f88 parser: protect against infinite loops in -silent mode over invalid .v files 2020-11-01 14:02:32 +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 7da1afa140 all: switch to the new fn arg syntax everywhere; add lots of vfmt -verify tests 2020-10-15 12:32:28 +02:00
Enzo fd88bfbac8
fmt: fix formatting of anon args (#6545) 2020-10-04 06:32:47 +02:00
Enzo 677b0ba2d2
gen: access fields in multi-type sumtype match (#6541) 2020-10-03 11:19:43 +02:00
Alexander Medvednikov fca344d1fb all: fn args => params 2020-09-27 03:32:56 +02:00
Alexander Medvednikov 624f22e27e all: mutability check (part 1); enable mutable sumtype args 2020-09-22 05:28:29 +02:00
Alexander Medvednikov b74c1805d7 cgen/autofree: fix and simplify optionals 2020-09-12 16:40:52 +02:00
Nick Treleaven eb95a4333a
table: rename Arg to Param (#6337) 2020-09-09 13:21:11 +02:00
Alexander Medvednikov 3410705974 autofree: lots of fixes 2020-09-05 12:00:35 +02:00
Nick Treleaven 7dbae14e19
checker: error on `mut name =` (#6247) 2020-08-28 20:07:32 +03:00
Maciej Obarski e8e0d9fa42
all: [direct_array_access] tag (#6203) 2020-08-24 09:04:50 +02:00
Daniel Däschle fcc61a981d
all: TypeSymbol.source_name (#6187) 2020-08-22 12:29:15 +02:00
Alexander Medvednikov c5aa2bfa51 tests: fix a match test 2020-08-11 16:26:52 +02:00
Delyan Angelov bd32f0969f parser: enable CamelCase named method names for JS. objects 2020-08-10 10:39:14 +03:00
Nick Treleaven 2dd90de993
parser: error on `[unsafe_fn]` (#6090) 2020-08-09 12:22:11 +03:00