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
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
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
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
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
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
Delyan Angelov
7d57559b70
datatypes: make the out of bounds errors for lists APIs more detailed
2022-11-22 13:42:29 +02:00
yuyi
cc7e6006f9
checker: fix generic fn with short generic struct init syntax ( #16504 )
2022-11-22 13:27:49 +02:00
lemon
00383edd3d
native: add more operator support for floats on amd64 ( #16498 )
2022-11-21 12:48:24 +02:00
Delyan Angelov
c744030665
tests: add a watchdog thread to live_test.v to prevent it from blocking the whole CI on slow sanitized jobs
2022-11-21 12:24:54 +02:00
Delyan Angelov
c286775d9f
strconv: add test_atof_converter to the tests, as suggested by the code review
2022-11-21 07:41:41 +02:00
Delyan Angelov
6cd1723deb
strconv: fix float_prec := 1.9999999999999999 + 0.0000000000000000005
being 0.5 ( fix #16448 ) ( #16495 )
2022-11-21 03:57:51 +03:00
Delyan Angelov
0e727ec50a
checker: cleanup obsolete code for compatibility between byteptr and &byte ( #16494 )
2022-11-20 16:44:58 +02:00
Delyan Angelov
cb336c7dc7
net.http: remove ending \r from response.status_msg, add more tests
2022-11-20 16:22:43 +02:00
Hitalo Souza
45854882b9
builtin, cgen: support FieldData.unaliased_typ, use it for generalising x.json2
(able to encode type aliased struct fields) ( #16469 )
2022-11-20 11:18:14 +02:00