16092 Commits

Author SHA1 Message Date
yuyi
ec30256c7f
builtin: cleanup obsolete function in string.v and array.v (#19451) 2023-09-27 19:49:33 +03:00
yuyi
981f76cd04
builtin, cgen: fix printing slice of fn call string (#19450) 2023-09-27 14:53:56 +03:00
Delyan Angelov
b3ee304381
tests: skip testing v -os windows -experimental -b native -o hw.exe examples/hello_world.v on !windows 2023-09-27 12:31:33 +03:00
Delyan Angelov
e115d4461c
checker: allow for each(a, |x| println(x)), i.e. using lambda expressions, when expecting fn (x int) 2023-09-27 11:49:12 +03:00
Delyan Angelov
b81a5325ef
arrays: add arrays.each, arrays.each_indexed, and tests for them 2023-09-27 11:26:05 +03:00
Delyan Angelov
3de43b82e0
v.ast: improve Stmt.str(), showing more details about ast.Block, ast.DeferStmt, ast.ForInStmt, ast.GlobalDecl 2023-09-27 11:11:41 +03:00
squidink7
12ee3fa86a
toml: add decoding for struct fields of type map[string]T (#19447) weekly.2023.39 2023-09-26 12:53:24 +03:00
Artem Yurchenko
bd9f42d14f
github: improve the voting message for issues (#19448) 2023-09-26 12:48:34 +03:00
Slashscreen
8b31eab88d
cgen: remove the special plan9 support code, treat it instead as a posix system in cheaders.v (#19445) 2023-09-26 07:20:48 +03:00
wygsh
245f8e39f1
cgen: fix promoting an alias typed value, to a sumtype of the alias's base type (fix #19407) (#19423) 2023-09-26 07:17:48 +03:00
Artem Yurchenko
a8a3d3a64d
CONTRIBUTING: use a direct link, to filter and order issues by likes (#19442) 2023-09-26 07:02:39 +03:00
Spydr
20bce37deb
native: parse dll files to resolve extern symbols (#19433)
* add simple parsing of dll files to resolve extern symbols
* use enums instead of string values in offsetof functions to reduce bug risks
* add `-d no_backtrace` to native test options
2023-09-25 12:58:17 +03:00
Nemoola
07bd94fa14
v.builder: fix compiling code, that imports modules from both src/modules and modules (#19437) 2023-09-25 12:48:43 +03:00
Adam Oates
e7aa6a1870
parser, checker: allow lambdas anywhere anonymous functions are expected (#19436) 2023-09-25 12:45:27 +03:00
yuyi
28234c76c6
cgen: fix interface with option field (#19434) 2023-09-24 19:54:22 +03:00
yuyi
b30426aafb
cgen: cleanup in comptime_if_conds() (#19432) 2023-09-24 19:52:41 +03:00
Ikko Eltociear Ashimine
7e08a50ea5
builtin: fix typo in string.v (#19431) 2023-09-24 15:11:47 +03:00
Alexander Medvednikov
a1f5552529 checker: warn -> error for uninitialized ref fields 2023-09-24 15:10:39 +03:00
yuyi
7bfb35dd1c
cgen: cleanup in array.v (#19429) 2023-09-24 05:48:48 +03:00
Delyan Angelov
a685088fbd
checker: support lambda expressions in array methods like a.map(|x|x*10) too (#19424) 2023-09-23 22:08:48 +03:00
yuyi
9954f89e3f
checker, cgen: fix fixed array of option with default value (#19422) 2023-09-23 22:03:22 +03:00
yuyi
1c9ab77499
cgen: cleanup verbose code in assign_stmt() (#19421) 2023-09-23 15:55:34 +03:00
yuyi
83d461441e
cgen: fix struct field option type with default value init (#19420) 2023-09-23 15:54:08 +03:00
encyclopaedia
04d28f2a74
arrays: add a partition function, that splits a given array, based on a criteria, passed as a callback fn (#19417) 2023-09-23 15:52:54 +03:00
yuyi
5905f63e95
parser: fix assigning with in another module sumtypes 2 (#19415) 2023-09-23 08:59:48 +03:00
Delyan Angelov
3fab3213b8
docs: update the $embed_file() section (#19416) 2023-09-22 21:37:16 +03:00
yuyi
9929e956f0
parser: fix assigning with in another module sumtypes (#19414) 2023-09-22 18:00:26 +03:00
Delyan Angelov
ed42341642 pref,builder: support -use-os-system-to-run to workaround segfaults using not fully updated xcode command line tools 2023-09-22 14:10:01 +03:00
Tobias Neitzel
3fb1230cc3
toml: fix toml encoding of complex types (#19408)
* Improve default toml encoder for complex types

The default toml encoder failed for more complex structs, as certain
edge cases were not covered. This commit attempts to fix this by adding
additional handling for these edge cases.

* Improve map encoding

Since maps currently only support keys that have a string
representation, we can utilize this during map encoding.

* Add test cases for toml encoding

Added test cases for toml encoding of complex nested structs and structs
that contain maps.

* Add additional test cases
2023-09-22 13:00:10 +03:00
Delyan Angelov
edc9ff4f12
examples: add more .obj files for 06_obj_viewer (#19406) 2023-09-22 09:59:52 +03:00
yuyi
b440f693aa
cgen: fix fixed array with index variable (#19405) 2023-09-22 02:31:30 +03:00
Swastik Baranwal
5ddbbfcfd8
checker: allow using ! and ~ on aliased bool and integral types (#19403) 2023-09-21 19:46:26 +03:00
Delyan Angelov
c075e44ec1
ci,examples: fix v examples/sokol/simple_shader_glsl/simple_shader.v, ensure it compiles on the misc-tooling job (#19404) 2023-09-21 19:44:58 +03:00
yuyi
baf5d8a102
checker: fix generic comparison for conditional assignment (#19401) 2023-09-21 14:34:51 +03:00
yuyi
4f7dbbfa52
cgen: fix fixed array of option type default (#19397) 2023-09-21 09:45:23 +03:00
Yamamoto Haruhi
7169df3e57
builder: fix compiling code, importing a local module in src/modules (#19396) 2023-09-20 19:22:00 +03:00
Delyan Angelov
f93d257d29
all: support short lambda expressions like a.sorted(|x,y| x > y), in all callsites that accept a fn callback (#19390) 2023-09-20 17:22:16 +03:00
yuyi
175a3b2684
parser: fix fixed array of option values (_ := [10]?int{}) (#19392) 2023-09-20 15:34:42 +03:00
asvln
6d56639cc1
orm: quote table and field name in [references] (#19387) 2023-09-20 08:56:58 +03:00
Delyan Angelov
cb9584fefe
ci: v fmt -w vlib/v/doc/doc.v and vlib/v/pref/os.v 2023-09-20 08:55:32 +03:00
Slashscreen
33754f43fa
all: support -os plan9, $if plan9 {, and _plan9.c.v (stage 1 for plan9) (#19389) 2023-09-20 07:27:30 +03:00
yuyi
fdabd27be8
cgen: fix channel of interface (fix #19382) (#19383) 2023-09-19 14:02:26 +03:00
Swastik Baranwal
f9334c8340
checker: disallow assigning pointer values to option struct fields (#19380) 2023-09-19 13:59:57 +03:00
Delyan Angelov
350a8d3b35
ci: fix ./v -W examples/eventbus/eventbus.v after 551a065 (todo: perhaps it should be reverted completely) 2023-09-19 07:24:55 +03:00
Alexander Medvednikov
77219de173 ci: bring back gitly 2023-09-18 23:44:22 +03:00
Alexander Medvednikov
551a065ce6 eventbus: V ui on_key_down fix 2023-09-18 23:42:32 +03:00
yuyi
ff452cc514
cgen: fix interface with multiple embedded fields (#19377) 2023-09-18 23:22:19 +03:00
Swastik Baranwal
be53b02511
checker: require else branch in [flag] enum match (#19375) 2023-09-18 16:07:30 +03:00
Casper Küthe
74d80a5120
orm: add support for V enum struct fields (#19374) 2023-09-18 16:06:26 +03:00
yuyi
e1a48d6c2e
fmt: simplify formatting struct field comments (#19373) weekly.2023.38 2023-09-17 19:45:43 +03:00