1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

14429 Commits

Author SHA1 Message Date
yuyi
7e9e2ff459
cgen: fix if expr with multiple array call (fix #16583) (#16589) 2022-12-05 12:07:39 +02:00
yuyi
59c979c8d2
checker: check generic interface type specifing type names (fix #16576) (#16591) 2022-12-05 10:05:32 +02:00
Larpon
349ce08a11
tools: fix vcompletion for single-file directories (#16586) 2022-12-05 09:15:43 +02:00
Swastik Baranwal
ce06c2818d
checker: add disallow none operations and range (#16584) 2022-12-05 08:50:36 +02:00
yuyi
ffc73bf643
builder: fix v builder error (#16590) 2022-12-05 08:48:45 +02:00
Delyan Angelov
d8d75ee67e v.builder: fix v -os wasm32_emscripten examples/2048 on windows 2022-12-04 17:49:33 +02:00
Delyan Angelov
f5d0ba318e
testing: support new events in the output modules of v test: .cmd_begin sent right before a _test.v execution, and .cmd_end sent right after a _test.v execution 2022-12-03 20:06:46 +02:00
RGBCube
5acd855525
term: add format_esc/1 (#16574) 2022-12-03 14:01:39 +02:00
Delyan Angelov
bf0c8a0d96 sync: fix compilation of V on m1 with tcc 2022-12-02 23:17:46 +02:00
Delyan Angelov
d09c8c914b
testing: refactor the v test implementation to make supporting different output modes easier 2022-12-02 18:12:42 +02:00
Delyan Angelov
e419faf746
all: fix dependant->dependent typos, cleanup comments 2022-12-02 12:51:10 +02:00
Delyan Angelov
675c362f57
v.util: cleanup util.path_styled_for_error_messages/1 2022-12-02 11:48:01 +02:00
Delyan Angelov
c77344e0a2
checker: add a return *x suggestion, to the error fn ... expects you to return a non reference type ..., but you are returning ... instead 2022-12-02 10:40:36 +02:00
yuyi
f16722596c
all: replace generic '<>' with '[]' in error messages and comments (#16571) 2022-12-02 09:22:48 +02:00
Tim Marston
cbe64cb543
checker: allow struct updates from struct aliases (#16567) 2022-12-02 00:28:10 +02:00
RGBCube
18d98a5e16
.github: clean issue templates (#16566) 2022-12-01 18:29:59 +02:00
Larpon
6e24f7e13a
gg: always use 4 channels in init_sokol_image (#16564) 2022-12-01 18:54:37 +03:00
Delyan Angelov
161847ed1a
v.pref: make -b unknown_backend an error, with a more informative diagnostic message 2022-12-01 15:28:51 +02:00
RGBCube
02f5c59340
docs: remove Android from the common installation section header, as it has its own section (#16563) 2022-12-01 14:59:44 +02:00
Delyan Angelov
32976863a8
github: add existing "Unit: Documentation" label to the documentation issue template. 2022-12-01 14:49:50 +02:00
yuyi
c06696bc9a
cgen: fix printing multi-reference struct (#16560) 2022-11-30 21:30:15 +02:00
yuyi
fd04c1a03a
cgen: fix error of match expr (fix #16554) (#16555) 2022-11-30 12:04:20 +02:00
Christopher Fore
3175bf374d
Add Arch command for MingW (#16558) 2022-11-30 00:17:34 +02:00
Delyan Angelov
675a1be975
math: remove the deprecated math.mathutil module too 2022-11-29 14:56:40 +02:00
Delyan Angelov
3fff786f36
math: remove the deprecated math.util module 2022-11-29 14:42:46 +02:00
Delyan Angelov
952f4644c5
math.big: remove import math dependency (math.big only uses min/max/abs) 2022-11-29 14:42:46 +02:00
Delyan Angelov
6ef3dfdea9
sokol: fix v -Wimpure-v examples/2048/ 2022-11-29 14:42:45 +02:00
Delyan Angelov
7df8f063ed
builtin: fix typo 2022-11-29 14:42:44 +02:00
yuyi
dff61300fb
table: optimize fn_type_signature() (#16552) 2022-11-29 13:13:58 +02:00
Swastik Baranwal
58e150df12
parser: add a better error msg for using ..., instead of .. in for a in 1...10 { (#16547) 2022-11-28 10:37:12 +02:00
yuyi
d257e43932
checker: fix 'return none' in void optional function (#16545) 2022-11-28 10:29:02 +02:00
yuyi
7d8c386721
datatypes: change optional to result (#16546) 2022-11-28 10:24:47 +02:00
Delyan Angelov
1d24dbe602
builtin: document string.to_wide() and string_from_wide()/1 2022-11-28 09:46:04 +02:00
Delyan Angelov
73675dca87
builtin: move v_segmentation_fault_handler to builtin.c.v, make it more informative 2022-11-27 12:11:06 +02:00
Delyan Angelov
fdbd40d806
scanner: make Scanner.peek_token more robust (p.peek_token(-999999) will return an EOF token, instead of garbage data) 2022-11-27 12:09:43 +02:00
Delyan Angelov
50b73abc62
parser: add p.show() to ease debugging parser problems, that need more context
Using it, produces output like this on stdout:
```
>> vlib/v/tests/typeof_type_test.v:4:        keyword `typeof`  token `(`  token `[`      keyword `fn`                      token `(`  name `s`  name `string`
>> vlib/v/tests/typeof_type_test.v:8:        keyword `typeof`  token `(`  token `[`      name `int`                        token `]`  token `)`  token `.`
>> vlib/v/tests/typeof_type_test.v:9:        keyword `typeof`  token `(`  token `[`      name `int`                        token `]`  token `)`  token `.`
>> vlib/v/tests/typeof_type_test.v:13:       keyword `typeof`  token `(`  token `[`      name `u32`                        token `]`  token `)`  token `.`
>> vlib/v/tests/typeof_type_test.v:14:       keyword `typeof`  token `(`  token `[`      name `u32`                        token `]`  token `)`  token `.`
>> vlib/v/tests/typeof_type_test.v:18:       keyword `typeof`  token `(`  token `[`      name `string`                     token `]`  token `)`  token `.`
```

Note: this tracing output is *deliberately on `stdout`*, instead of `stderr`,
so that you can filter it more easily, without saving it to a file first, i.e.
you can use it while developing/debugging parser issues like this:
`./v -o vnew cmd/v && ./vnew some_file.v | grep some_file.v`

-> this will show only the parsing context for the constructs you are debugging,
for that specific file *only*, instead of for all of `builtin` and the imported files etc.
2022-11-27 11:13:42 +02:00
yuyi
cf3dda2a58
datatypes: fix fsm.set_state() and cleanup fsm module (#16539) 2022-11-27 09:10:08 +02:00
Vincenzo Palazzo
8543d5e055
checker: improve mut arg error msg (#16540) 2022-11-27 07:07:35 +03:00
yuyi
ef5be22f81
all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
yuyi
b19b97e7b1
generic: replace generic <> with [] part 1 - allow for both (#16532) 2022-11-26 08:59:42 +02:00
Swastik Baranwal
a9b41d2980
all: add support for const ident in match range (#16526) 2022-11-26 08:56:00 +02:00
yuyi
dee75fe970
checker: perfect infer_struct_generic_types() (#16524) 2022-11-24 19:30:02 +02:00
yuyi
f6cc88fa69
tests: add new test for #16519 (#16520) 2022-11-24 15:56:07 +02:00
yuyi
f0a23c8d3c
cgen: fix fn call of sumtype with alias fntype variant (#16519) 2022-11-24 12:05:57 +02:00
yuyi
8b5c75c481
cgen: fix sumtype with alias fntype variant (#16516) 2022-11-23 19:46:58 +03:00
shove
d632e84090
cgen: fix comptime optional methods call and optional field (fix #16499 #16465) (#16503) 2022-11-23 19:08:49 +03:00
Delyan Angelov
a987f84b15
ci: skip the very slow running tests in v test-self, when -asan-compiler or -msan-compiler is passed as well. 2022-11-22 19:52:43 +02:00
Subhomoy Haldar
f7a11b8e50
toml: update value_opt syntax and add missing documentation (#16510) 2022-11-22 19:45:12 +02:00
yuyi
7c7ebd648d
checker: check assigning generic function to a variable (#16507) 2022-11-22 17:56:49 +02:00
yuyi
27cdf5ae0e
checker: minor cleanup in checker module (remove pub from most of checker's methods) (#16505) 2022-11-22 17:50:26 +02:00