Commit Graph

121 Commits (870ed86afc4023d46ca2433285de20b4c2e5d088)

Author SHA1 Message Date
Daniel Däschle 54bbc00493
fmt: remove space in front of ? and ! (#14366) 2022-05-13 10:10:39 +02:00
Delyan Angelov b9ee4204df
parser: make script mode errors more informative, when a top level declaration is encountered, after script mode had already started 2022-05-13 10:10:39 +02:00
yuyi 56093b53d6
parser: check error for generic struct parameter (#14362) 2022-05-13 10:10:37 +02:00
Daniel Däschle 85cb0a8c85
all: basic implementation of result type (#14140) 2022-04-30 16:26:27 +02:00
Alexander Medvednikov de310491bb
tests: use u8 everywhere 2022-04-17 12:14:29 +02:00
Vincenzo Palazzo 359f16fdfd
parser: fixed parsing prototype function with recursive type (#13922) 2022-04-05 18:39:49 +03:00
yuyi dd1a8cbadc
parser: check error for struct field type using 'mut' (#13847) 2022-03-28 18:13:38 +03:00
Nick Treleaven fcb57312b9
parser: error if parameter name starts with a capital (#13827) 2022-03-26 19:56:34 +02:00
yuyi bb2ddb98a3
parser: check if guard condition (#13765) 2022-03-18 17:49:20 +03:00
yuyi 92cafd8851
checker: check invalid 'mut' keyword in infix expr (#13742) 2022-03-15 14:50:17 +03:00
yuyi 1d83ab6be1
parser: check using invalid keyword with none ident (#13743) 2022-03-15 12:58:03 +02:00
yuyi 1993bf2a12
parser: cleanup map syntax (#13713) 2022-03-11 12:15:52 +03:00
yuyi 8136157f87
checker: fix error for 'or expr with nested match expr' (#13658) 2022-03-05 13:06:08 +02:00
ChAoS_UnItY 63b41e67fa
v.parser: change body_start_pos to function declaration's lcbr, resolve #13642 (#13646) 2022-03-03 19:51:27 +02:00
yuyi bc16c61f6f
parser: check using 'mut' on fn_decl return type (#13610) 2022-02-27 14:23:43 +02:00
yuyi 0fb1eaef04
parser: check the redefinition of built-in IError (#13606) 2022-02-26 09:52:40 +02:00
yuyi 83ea97b1a3
parser: fix optional expr with array value (#13599) 2022-02-25 15:54:12 +03:00
yuyi 04654ed518
parser: check error for defer propagate (fix #13534) (#13536) 2022-02-20 12:29:08 +02:00
yuyi 842fd7a27e
parser: check assign expr with undefined variables of struct_init (#13495) 2022-02-17 10:21:03 +03:00
Delyan Angelov 9ed18efa53
checker: error on redefining any of the public builtin functions, not just ['print', 'println', 'eprint', 'eprintln', 'isnil', 'panic', 'exit'] (#13419) 2022-02-10 12:26:30 +02:00
yuyi 291a1ffd8d
token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
yuyi d553071e65
parser, checker: correct error message for a fixed array size using a non constant (fix #13219) (#13228) 2022-01-20 13:03:19 +02:00
jeffmikels 7a2705d8ce
scanner: multibyte rune literals now support unicode, hex, and octal escape codes (#13140) 2022-01-19 03:23:25 +03:00
yuyi f0b7e5049b
parser: check the receiver error of method call (#13203) 2022-01-18 12:47:06 +02:00
jeffmikels 4189b7e280
builtin: add a `byterune` method on `[]byte` (#13145) 2022-01-13 22:26:17 +02:00
Delyan Angelov 9278d4ec19
docs: fix a typo 2022-01-02 09:18:24 +02:00
Delyan Angelov 14648fa41e
parser: reduce max_expr_level to 310 (due to more limited stack size on windows) 2021-12-27 20:21:58 +02:00
Delyan Angelov a2eb90ee4e
parser: prevent too deep recursions in p.check_undefined_variables 2021-12-27 12:30:17 +02:00
Daniel Däschle 35282396ec
all: inline sum types (#12912) 2021-12-25 18:26:40 +03:00
ChAoS_UnItY 50d988ebc7
v.parser: forbid unsupported language functions/types in specific backends (#12655) 2021-12-18 10:00:31 +02:00
yuyi 8f4180ea09
parser: check generic parameters error of generic struct declaration (#12418) 2021-11-09 09:25:57 +02:00
Wertzui123 ea6d2d53db
parser: disallow `for mut in range` (fix #12234) (#12277) 2021-10-27 14:55:36 +03:00
yuyi 6aca360507
parser: fix checking unexpected name (#12233) 2021-10-19 12:27:59 +03:00
Alexander Ivanov 0386f2bbea
checker: add an interface check for mutability, fixes #1081, fixes #7038 (#11963) 2021-10-11 15:41:31 +03:00
Enzo 79c2bca401
v.scanner: fix error messages with unexpected token `?` (#11428) 2021-09-07 20:46:56 +03:00
Daniel Däschle 6dbc6f233b
v.parser: add checks for interoperability (C. or JS.) function declarations (#11140) 2021-08-12 10:47:24 +03:00
Enzo da53f818df
all: initial support for closures (x64 / linux-only) (#11114) 2021-08-10 21:27:15 +03:00
Daniel Däschle f59119485a
v.parser: add check for existing type on sum type declaration (#11054) 2021-08-04 18:14:16 +03:00
Daniel Däschle 800c0e5092
vlib: remove deprecated map{} usages as well as deprecated functions (#11035) 2021-08-04 12:44:41 +03:00
yuyi cb7be87d4e
parser: fix struct init and assign using `sql` variable (#10968) 2021-07-26 21:14:31 +03:00
Uwe Krüger 1e5627e777
parser: don't require unary `>` prefix for `select` timeout (#10928) 2021-07-23 23:24:27 +03:00
shadow fe5e3c452f
parser: disable generic type aliases (#10917) 2021-07-23 01:17:16 +03:00
Daniel Däschle ad3835b598
parser: deprecate short struct init (#10842) 2021-07-20 11:17:08 +03:00
Daniel Däschle 9127e202d5
v.parser: fix error on empty name expr (#10860) 2021-07-19 17:09:51 +03:00
Delyan Angelov 6aecda3be8
all: support `[noreturn] fn abc() { for{} }`, mark panic/1 and exit/1with it too. (#10654) 2021-07-04 20:24:19 +03:00
shadowninja55 830cf4645c
v.parser: prohibit registering selectively imported (structs / enums / aliases / interfaces) (#10579) 2021-06-28 10:26:09 +03:00
shadowninja55 9b84faad6f
v.parser: prohibit redeclaration of imported functions (#10564) 2021-06-25 14:27:58 +03:00
shadowninja55 be8be3d319
v.parser: prohibit redeclaration of builtin types (#10563) 2021-06-25 13:08:56 +03:00
Uwe Krüger d39a55ac11
checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
zakuro 1e856c0f94
parser: improve error message for `mod.unknownsubmod.Type` (#9976) 2021-05-04 11:31:31 +03:00