Commit Graph

358 Commits (43d6b97c217db3388ef4121b2c961913fe438d04)

Author SHA1 Message Date
yuyi f2eb50008d
parser, checker: cleanup struct short syntax processing (#13416) 2022-02-09 18:31:16 +02:00
div72 939bc9f26f
v.parser: fix compilation of normal .v files with -translated (#13363) 2022-02-06 12:53:20 +02:00
div72 cec7e91714
v.parser, v.checker, v.gen: add support for [translated] tag (#13373) 2022-02-06 00:16:02 +02:00
yuyi 291a1ffd8d
token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
yuyi 155f897270
ast, parser, checker: fix generic struct field with default struct value (#13158) 2022-01-13 22:25:25 +02:00
yuyi 86ba4517b1
parser: check error of anon fn argument type (#13103) 2022-01-09 16:15:34 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Delyan Angelov 43fee6b3d5
all: fix registration of methods with the same name on different generic structs 2021-12-28 21:42:48 +02:00
Daniel Däschle 35282396ec
all: inline sum types (#12912) 2021-12-25 18:26:40 +03:00
Delyan Angelov db1175e455
parser: handle `[noreturn]` on methods too 2021-12-22 19:58:37 +02:00
yuyi cd0b581445
ast: rename 'table.get_type_symbol()' to 'table.sym()' and more related calls (#12898) 2021-12-19 18:25:18 +02:00
ChAoS_UnItY 50d988ebc7
v.parser: forbid unsupported language functions/types in specific backends (#12655) 2021-12-18 10:00:31 +02:00
Delyan Angelov 6ff953d936
preludes,builder,cgen: add support for VTEST_RUNNER=tap and -test-runner tap (#12523) 2021-12-16 15:59:46 +02:00
Delyan Angelov df7f2aa8a3
all: support `[markused]` tags for fns/consts/globals 2021-12-15 14:34:49 +02:00
yuyi 7fc9e614a3
ast, parser, checker: fix generic fn in builtin module (#12769) 2021-12-09 21:37:43 +02:00
playX 2eb02ff5a7
jsdom, js: start refactoring jsdom; improve JS interfaces; add two attributes for them (#12488) 2021-11-17 11:41:33 +02:00
playX 6c32c544e1
js,parser: allow declaring methods on JS interfaces for easier FFI (#12447) 2021-11-13 11:08:17 +02:00
yuyi 8f4180ea09
parser: check generic parameters error of generic struct declaration (#12418) 2021-11-09 09:25:57 +02:00
Delyan Angelov c4e282a0c8
parser: check fn args in declarations too with `-Wimpure-v`
`v -Wimpure-v examples/2048/` now passes cleanly.
2021-11-03 16:20:24 +02:00
yuyi 943a807d30
parser: implement generics method with auto multi generic types (#12312) 2021-10-27 15:41:13 +03:00
playX a3de67de28
js: support WASM interoperability using `wasm_import`/`wasm_export` fn tags (#12212) 2021-10-18 10:56:21 +03:00
Delyan Angelov 4c2cb1b6df
vdoc: prevent leaking to the docs the `pure_v_but_overriden_by_` prefix 2021-10-14 11:47:50 +03:00
yuyi f1742a6f62
v.ast: change 'type.to_ptr()' to 'type.ref()' (#12086) 2021-10-06 20:49:39 +03:00
yuyi 108a01d65f
fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
Enzo ccf6285f82
checker: allow mut arg on C functions (#11430) 2021-09-11 14:25:38 +03:00
Delyan Angelov ec196cfcd1
all: support overriding individual function from .v files in .c.v or .js.v files. 2021-08-22 15:51:26 +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 815c4b7420
all: rename generic_struct_inst to generic_inst (#11044) 2021-08-04 03:37:27 +03:00
Daniel Däschle ad3835b598
parser: deprecate short struct init (#10842) 2021-07-20 11:17:08 +03:00
playX 425ca5e3c3
v.gen.js: add three backend options for JS, and comptime if support (#10859) 2021-07-19 15:55:03 +03:00
yuyi aca66d503d
parser: minor optimization in call_expr() (#10809) 2021-07-15 17:47:59 +03:00
shadowninja55 d1f1c5ae51
v doc: add attribute tags to `v doc -f html` (#10778) 2021-07-13 08:27:20 +03:00
Alexander Medvednikov 0f72bc9819 parser: temporary [c2v_variadic] fn attr for c2v'ed code 2021-07-05 11:32:15 +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 2e5ed08558
v.parser: allow anonymous function to return a function (#10592) 2021-06-28 11:51:24 +03:00
shadowninja55 9b84faad6f
v.parser: prohibit redeclaration of imported functions (#10564) 2021-06-25 14:27:58 +03:00
Uwe Krüger f32a76b268
all: promote value type function arguments to heap if necessary (#10528) 2021-06-20 18:40:24 +03:00
Delyan Angelov 39e7290416
v: support for `[if expr]`, part 2 (old `[if ident]` is not yet deprecated) 2021-06-17 18:55:20 +03:00
Emily Hudson 535dcac8fa
net: ipv6 support, merge unix+ip;[pack:x] attribute (#9904) 2021-06-13 23:53:38 +03:00
Uwe Krüger daeeaef030
vfmt: hot fix to allow separate `array_d_gcboehm_opt.v` (#10413) 2021-06-11 12:00:18 +03:00
crthpl 6576d876fc
cgen: support a `[_naked]` fn attribute (#10418) 2021-06-11 11:03:39 +03:00
Delyan Angelov 3dc4d13160
v.parser: do not treat test_ functions specially outside of _test.v files 2021-06-08 23:01:49 +03:00
yuyi 114c382c46
parser: fix generic fn typeof name (#10363) 2021-06-06 17:40:13 +03:00
Uwe Krüger d39a55ac11
checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
Delyan Angelov e9fa53b0c1
v.parser: let fn_decl use 1 loop, instead of multiple p.attrs.contains calls 2021-05-23 16:54:12 +03:00
Delyan Angelov bf3af40f13
v.markused: support `./v -skip-unused -freestanding run vlib/os/bare/bare_example_linux.v` too 2021-05-23 16:25:34 +03:00
Uwe Krüger d26ac5692e
all: various fixes for [heap]/auto-heap handling (#10033) 2021-05-07 15:58:48 +03:00
Delyan Angelov ea74e2bc64
v.parser: add p.unique_prefix, add run_project_folders_test.v (closes #10023) 2021-05-06 21:14:19 +03:00
yuyi ae22967d1d
parser: ensure generic function declaration specifies type names (fix #9959) (#9967) 2021-05-02 19:30:39 +03:00