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

7567 Commits

Author SHA1 Message Date
Uwe Krüger
aa861d1cac
docs: describe array/slice behaviour (#10252) 2021-05-30 14:48:33 +03:00
yuyi
13ddfaa433
checker: fix generic fn infer nested struct (#10262) 2021-05-30 14:06:52 +03:00
yuyi
c67891d69f
checker: minor cleanup in match_expr() (#10261) 2021-05-30 13:33:19 +03:00
Thomas Treffner
ba86d619fa
builtin: fix print/println on termux (#10253) 2021-05-30 08:10:32 +03:00
Delyan Angelov
b29bc9cdce
checker: fix panic on fn abc()?{ return error() } 2021-05-29 23:46:56 +03:00
Bastian Buck
d6e462a6ca
os: fix os.is_link and os.symlink on windows, add new functions os.getppid, os.getgid, os.getegid (#10251) 2021-05-29 23:26:13 +03:00
yuyi
e4f6369cd1
checker: fix match error to none (#10245) 2021-05-29 19:30:57 +03:00
Uwe Krüger
2d8a136d6e
os: fix file read (#10247) 2021-05-29 16:53:42 +03:00
Uwe Krüger
15557161cc
builtin: add trailing 0 to reversed string (#10248) 2021-05-29 16:45:26 +03:00
Uwe Krüger
bd467f94ab
encoding: append 0 to strings for compatibility (#10249) 2021-05-29 16:31:52 +03:00
Uwe Krüger
0ff2d9ef78
strconv: fix memory corruption (#10250) 2021-05-29 16:24:09 +03:00
yuyi
8785599094
checker, cgen: fix optional with if expr (#10242) 2021-05-29 10:00:12 +03:00
KJ Lawrence
465860e418
gg: fix ctx.scale for circles (#10210) 2021-05-28 22:37:02 +03:00
Lukas Neubert
ddcc22a778
fmt: fix removal of selective imported map key type (#10235) 2021-05-28 22:29:03 +03:00
Lukas Neubert
6b683d31ac
v.parser: support imported enums as map keys (#10234) 2021-05-28 20:09:03 +03:00
yuyi
9ea753e853
checker: fix generic with fixed array parameter (#10233) 2021-05-28 18:51:55 +03:00
penguindark
7089ff3957
builtin: fix a bug in str_intp (#10238) 2021-05-28 18:44:30 +03:00
Alexander Medvednikov
ca8158ac41 parser: handle casts in match expressions; c2v: minor fixes 2021-05-28 17:59:43 +03:00
KJ Lawrence
9fab4af3f1
gg: update the mouse click callback to pass what mouse button was clicked too (#10225) 2021-05-28 12:46:23 +03:00
yuyi
6e493ca8ca
checker: check index_expr or_expr types mismatch (#10224) 2021-05-28 11:40:59 +03:00
Delyan Angelov
39de06c200
v.pref: cleanup V options, support the documented -output and -backend 2021-05-28 09:07:06 +03:00
Lukas Neubert
8a109b031c
fmt: minor optimization in call_expr (#10228) 2021-05-27 22:40:54 +03:00
Enzo
df2b688337
checker: cleanup type alias pascal case check (#10217) 2021-05-27 22:40:32 +03:00
Wertzui123
a095a27d00
gg: change vid to ved in a comment (#10218) 2021-05-27 20:14:36 +03:00
Ruofan XU
4e55b9c08e
example: improve binary search tree example (#10226) 2021-05-27 20:13:02 +03:00
Delyan Angelov
2b62dca000
v: support for $if threads {}, depending on whether go ` was used at all (#10227) 2021-05-27 18:36:07 +03:00
KJ Lawrence
6cdc7646b8
gg: add quit fn (#10223) 2021-05-27 17:56:18 +03:00
Uwe Krüger
8828054e5b
builtin: fix arrays/slices memory bug (#10219) 2021-05-27 15:50:06 +03:00
Anton Zavodchikov
539594bfce
sqlite: add error struct for optional result (#10209) 2021-05-27 12:45:34 +03:00
Lukas Neubert
d5cacd1e5f
ast: use string builder for StringInterLiteral.str() (#10207) 2021-05-27 10:17:51 +03:00
zakuro
607dbd36d7
parser: set is_public of TypeSymbol for fn type decl (#10212) 2021-05-27 10:17:08 +03:00
yuyi
7c0cd2f41d
checker, cgen: fix match with complex sumtype exprs (#10215) 2021-05-27 10:13:50 +03:00
Alexander Medvednikov
2abbbcc02d checker: allow int <=> enum usage in c2v'ed code 2021-05-26 11:00:57 +03:00
penguindark
2dd1d3fcbb
all: string interpolation code cleaning (#10204) 2021-05-26 09:30:08 +03:00
Joe Conigliaro
5e26273529
cgen: use __new_array instead of __new_array_with_default for empty vargs 2021-05-26 15:48:48 +10:00
Joe Conigliaro
560301dbfe
cgen: dont preallocate zero length with capacity of 1 2021-05-26 14:51:20 +10:00
yuyi
cf07375d1b
checker: fix multi types generic struct init (#10201) 2021-05-25 19:51:55 +03:00
Enzo
39c376bb5b
builtin,gen: use operator overloading on ustring (#10197) 2021-05-25 14:51:48 +03:00
joe-conigliaro
4217f05146
checker/ci: workaround bug causing errors with -usecache (sumtype field access) & add more -usecache tests (#10199) 2021-05-25 12:28:18 +03:00
R cqls
5b8402bccb
parser: fix mod_path_to_full_name to be compliant with --path option (#10149) 2021-05-25 07:46:40 +03:00
yuyi
f3274700cd
cgen: fix generic struct to string (#10191) 2021-05-25 07:45:54 +03:00
Ryan Roden-Corrent
306c16f0fa
fmt: don't break indexing in string interpolation. (#10195) 2021-05-25 07:45:32 +03:00
yuyi
7d210da9a5
checker: minor refactor in check_basic() (#10196) 2021-05-25 07:45:05 +03:00
yuyi
0e6f0c1de0
checker: check generic struct init without type parameter (#10193) 2021-05-25 06:15:05 +03:00
Delyan Angelov
13d1d28db1
v.parser: fix -autofree for script mode programs that do not have explicit fn main(){} 2021-05-24 14:42:09 +03:00
Enzo
ce7f78522d
builtin: remove former string operator methods (#10184) 2021-05-24 14:05:29 +03:00
Enzo
886f69bfcf
all: use operator overloading on strings (p. 2) (#10183) 2021-05-24 11:38:31 +03:00
Enzo
c0b1f99935
checker: allow operator overloading on strings (p. 1) (#10182) 2021-05-24 10:23:57 +03:00
penguindark
d8d05e0106
all: new string interpolation in pure V (#10181) 2021-05-24 05:20:45 +03:00
Delyan Angelov
603e57745f
builder: use some -cstrict flags only with clang (gcc does not understand them) 2021-05-23 21:00:48 +03:00
yuyi
eb5ac23988
checker: fix match expr with if expr (fix #10177 #10178) (#10179) 2021-05-23 17:59:57 +03:00
Delyan Angelov
7f12bfa563
builtin: optimise sx == sy in the case where strings have common prefixes 2021-05-23 17:22: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
Delyan Angelov
5efd8c62d0
ci: fix tests-sanitize-undefined-clang 2021-05-23 15:13:53 +03:00
Delyan Angelov
a27e7f7675
builtin: remove commented code; improve print_backtrace with tcc 2021-05-23 12:37:40 +03:00
Delyan Angelov
a08cbd364a
v.checker: improve C.printf(abc) deprecation precision 2021-05-23 12:18:21 +03:00
yuyi
ae9f8627fc
checker: simplify generic structs (#10167) 2021-05-23 05:54:58 +03:00
Lukas Neubert
79b97fa361
fmt: keep names of parameters in anonymus function (#10173) 2021-05-23 05:54:39 +03:00
pancake
efa07cbcbf
native: initial support for linux-arm64 (hello world only for now) (#10176) 2021-05-23 05:54:28 +03:00
Delyan Angelov
bc01de2181
ast: mark ast.File{} with [heap], and use []&ast.File consistently 2021-05-22 19:06:55 +03:00
Delyan Angelov
e512caf8f5
vfmt: do not error on field [fsize]Type, where fsize is from another .v file 2021-05-22 16:42:38 +03:00
Alexander Medvednikov
7c0f8f7644 builtin: a small optimization in string.replace() 2021-05-22 14:35:36 +03:00
yuyi
565dbc4051
checker: fix inferring method receiver types (#10166) 2021-05-22 11:04:19 +03:00
Delyan Angelov
104d9a7c8a
net: cleanup #include directives 2021-05-22 10:53:19 +03:00
Delyan Angelov
bf97faf32a
os: simplify os.read_bytes_into_newline to fix compilation on freebsd 2021-05-22 07:48:12 +03:00
Delyan Angelov
b7bf4b034e
os: use stricter declarations for C.getc/1, C.fseeko/3 and C._fseeki64/3 2021-05-22 07:45:00 +03:00
Alexander Medvednikov
dcfea5c69b vweb: detect mime type automatically in serve_static() 2021-05-22 07:02:25 +03:00
Lukas Neubert
788520eb52
fmt, ast: fix usage of import aliases (#10151) 2021-05-21 20:33:04 +03:00
yuyi
9be596ef12
checker: fix generic struct with anon fn type (#10161) 2021-05-21 17:21:18 +03:00
Sebastian Schicho
04ea2824d3
os: implement File.read_bytes_into_newline method for reading into a buffer, line by line (#10129) 2021-05-21 13:18:08 +03:00
yuyi
87ded1784e
checker: a minor optimization in file_has_main_fn() (#10143) 2021-05-21 06:14:57 +03:00
zakuro
d8cf26aaba
fmt: fix trailing arg formatting (#10155) 2021-05-21 06:14:07 +03:00
zakuro
be92f81b2e
checker: fix type error in f<T>(fn (v T)) with multiple different Ts (#10154) 2021-05-21 06:13:04 +03:00
Lukas Neubert
f7cd95472a
checker: clarify duplicate import error (#10150) 2021-05-21 06:12:38 +03:00
yuyi
bf69d20353
checker: fix generic struct with anon fn parameter (#10147) 2021-05-20 16:57:27 +03:00
Delyan Angelov
da090f91d8
cgen: fix using and auto printing x := [16]&Type{} 2021-05-20 15:59:02 +03:00
Delyan Angelov
00b3092a92
term: use textscanner.new in term.strip_ansi/1 2021-05-20 11:24:44 +03:00
Delyan Angelov
888b9c020c
strings: add a new module strings.textscanner to simplify writing small parsers 2021-05-20 11:23:25 +03:00
Delyan Angelov
c8a9052a5f
term: add term.strip_ansi/1 (based on ansi2txt) and term.header_left/1 2021-05-20 10:15:37 +03:00
yuyi
492d264d08
checker: fix generic structs init (#10134) 2021-05-20 09:18:51 +03:00
Enzo
906b207e58
checker: deprecate using V strings in C function calls (#10140) 2021-05-20 09:17:44 +03:00
Delyan Angelov
b0de1f76e8
v.depgraph: fix ci/misc-tooling ./v -autofree -o v2 cmd/v task 2021-05-20 07:24:13 +03:00
Alexander Medvednikov
f09a5135e9 checker: handle builtin enum init correctly 2021-05-20 03:14:32 +03:00
Delyan Angelov
ac469f5eff
v.depgraph: fix detection of indirect module dependency cycles 2021-05-20 01:53:41 +03:00
spaceface
9ddf1ec327
cgen: fix accessing fields in propagated optional subexpressions (#10136) 2021-05-19 21:28:17 +03:00
Lukas Neubert
be189e0059
fmt: keep generics for selective import as fn param (#10138) 2021-05-19 21:25:02 +03:00
Enzo
a639f94050
utf8: format utf8_util.v (#10135) 2021-05-19 13:03:43 +03:00
ScriptBoy2077
4974fd09e5
utf8: reverse() to handle unicode strings (#10133) 2021-05-19 12:24:08 +03:00
Delyan Angelov
2086e6f1c1
builtin, cgen: implement chunked allocation of 16MB blocks with -prealloc (#10130) 2021-05-19 10:35:56 +03:00
Delyan Angelov
94e7a55b97
builtin: implement -d trace_error
With debugger backtraces, it can help pinpoint the original source of a
bubbled error, until we can store stacktraces in the errors in an
efficient way.
2021-05-18 20:03:00 +03:00
Lukas Neubert
9a7acd244d
fmt: keep selective struct import when used in orm block (#10124) 2021-05-18 12:45:42 +03:00
Delyan Angelov
f1174daabd
time: remove err_invalid_8601 = error() const, use a const string instead 2021-05-18 12:32:09 +03:00
Delyan Angelov
453fb1b08b
term.ui: use os.signal_opt instead of os.signal 2021-05-18 11:59:57 +03:00
Delyan Angelov
21b34b3a0b
ci: bump up the deprecation date of os.signal to 2021-06-18 2021-05-18 11:06:00 +03:00
Delyan Angelov
4c22370635
regex: reformat README.md to use shorter lines 2021-05-17 14:40:22 +03:00
Alexander Medvednikov
664f220f40 vweb: a minor readme update 2021-05-17 08:51:52 +03:00
Delyan Angelov
d5c306ce57
sokol: add -lpthread flag on linux to prevent failing asserts in some cases 2021-05-16 20:21:29 +03:00
yuyi
4d7f15b55b
fmt: fix formating cascade generic types call_expr (#10107) 2021-05-16 11:53:55 +03:00
Delyan Angelov
9d8489b025 net.openssl: add -ldl -lpthread for linux 2021-05-16 08:28:46 +00:00