Commit Graph

226 Commits (691e6f9d3f4b20471120051c5be50c916ead806d)

Author SHA1 Message Date
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
Nick Treleaven 6cc8815931
parser: support [unsafe] instead of [unsafe_fn] (#6066) 2020-08-08 16:24:05 +02:00
Enzo f238890fe9
compiler: move attributes to declarations (#6026) 2020-08-04 20:10:22 +02:00
Delyan Angelov 8c4429c875 parser: fix passing the is_mut flag of anon fn arguments 2020-07-24 11:27:56 +03: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
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
Nick Treleaven 105a0e015e
checker: warn if unsafe method called outside unsafe block (#5863) 2020-07-17 19:14:12 +02:00
Enzo 2ee8f93d60
parser: duplicate method declaration on interface (#5825) 2020-07-15 10:23:21 +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