Delyan Angelov
eac1e25c5d
strings: simplify Builder ( #10263 )
2021-05-31 14:21:06 +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
Enzo
2d2b4f79cc
strings: add Builder.cut_to ( #10042 )
2021-05-07 19:41:27 +03:00
Delyan Angelov
aff21c976b
strings: fix for Builder.str() using b.len instead of b.buf.len
2021-04-25 09:07:46 +03:00
Delyan Angelov
fec89c7efb
ci: fix some of v test-cleancode
1
2021-04-05 20:47:32 +03:00
Alexander Medvednikov
57e6138a61
all: remove byteptr and charptr; replace them with &byte and &char
2021-04-04 17:43:32 +03:00
Delyan Angelov
82f3ca2d55
strings: use deprecated_after for the .write_bytes method
2021-04-04 10:01:26 +03:00
Delyan Angelov
400b4027c9
strings: comment deprecation of Builder.write_bytes temporarily
2021-03-22 09:01:22 +02:00
zakuro
e3c0f305b2
os: deprecate os.File.write_bytes
and add os.File.write_ptr
( #9370 )
2021-03-20 09:02:28 +02:00
Alexander Medvednikov
7446d8dc44
strings: test Builder's cut_last on windows
2021-03-04 20:35:17 +03:00
Nick Treleaven
23f231ee61
builtin: tag array methods unsafe: *_many, grow_len, pointers ( #8983 )
2021-02-26 22:55:09 +01:00
zakuro
c113abe1a4
strings: make builder implement io.Writer ( #8914 )
2021-02-23 09:42:48 +02:00
zakuro
f54c1a5cc2
all: add strings.Builder.write_string and use write_string instead of write ( #8892 )
2021-02-22 13:18:11 +02:00
Delyan Angelov
514cabd7c8
strings: cleanup strings builder, allow reusing it
2021-02-21 13:34:29 +02:00
Nick Treleaven
4a0367a63c
vlib: add [unsafe] tag to more functions: tos, string_from_wide, strings.Builder: write_bytes, free ( #8766 )
2021-02-15 17:15:52 +02:00
Delyan Angelov
48892a52fa
strings: make valgrind reports for strings builders more usefull ( #8553 )
2021-02-04 20:45:35 +01:00
Delyan Angelov
dbaccd4272
vfmt: shorten main.const_name
to just const_name
2021-01-25 20:57:33 +02:00
Alexander Medvednikov
29d6e40f29
all: vfmt (new const rule)
2021-01-24 10:54:27 +01:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 ( #8029 )
2021-01-18 13:20:06 +01:00
zakuro
33694665f0
fmt: align each contiguous field of struct. not the whole. ( #7981 )
2021-01-12 04:38:43 +01:00
spaceface
214290d55b
fmt: add a space around single-line unsafe
expressions ( #7505 )
2020-12-23 19:13:42 +01:00
zakuro
6c341a77f5
strings: run v fmt ( #7438 )
2020-12-21 22:00:32 +02:00
Alexander Medvednikov
7da1afa140
all: switch to the new fn arg syntax everywhere; add lots of vfmt -verify tests
2020-10-15 12:32:28 +02:00
Alexander Medvednikov
6921d46185
all: rune type for `` literals
2020-08-27 06:46:37 +02:00
Delyan Angelov
36eae1c175
builtin: x.vstring() instead of string(x) ( #6102 )
2020-08-10 18:05:26 +02:00
Nick Treleaven
f5e6a83a05
builtin: unsafe vlib pointer indexing ( #5836 )
2020-07-15 21:56:50 +02:00
Alexander Medvednikov
c563168d69
rand: string()
2020-07-15 21:36:09 +02:00
Alexander Medvednikov
1c682d7b89
cgen/autofree: sb.writeln() optimization fixes
2020-07-13 18:59:47 +02:00
Alexander Medvednikov
d94a02ba79
strings: builder.writeln() optimization
2020-07-11 12:03:24 +02:00
Alexander Medvednikov
5de0f944bd
vweb: fix a template leak
2020-07-01 17:04:30 +02:00
Alexander Medvednikov
e78dc4d682
strings: fix a leak in builder
2020-07-01 16:52:04 +02:00
Delyan Angelov
78e1127d99
cgen: treat the main module like any other v module
2020-07-01 00:53:53 +02:00
Alexander Medvednikov
3f59f23427
vweb: fix a leak
2020-06-28 19:55:53 +02:00
Alexander Medvednikov
0138f46797
vweb: fix a leak
2020-06-28 13:56:38 +02:00
Alexander Medvednikov
fb5cae7376
orm: select where id = x
2020-06-17 04:05:20 +02:00
Alexander Medvednikov
ed58192e4c
v orm: select
2020-06-17 00:59:37 +02:00
Alexander Medvednikov
b3e416fb52
vweb: fix duplicate fn error with multiple templates
2020-06-09 12:43:20 +02:00
Uwe Krüger
013fdb8a4b
checker: restrict numeric promotions to cases where no data is lost
2020-05-27 05:42:48 +02:00
Uwe Krüger
2635be511f
all: re-apply C++ support
2020-05-18 21:38:06 +02:00
Alexander Medvednikov
07a78b2843
Revert "all: C++ compiler support"
...
This reverts commit 9a237c3e82
.
2020-05-18 17:05:48 +02:00
Uwe Krüger
9a237c3e82
all: C++ compiler support
2020-05-18 15:51:36 +02:00
yuyi
7f4cf08516
parser: check (mut f Foo)
syntax
2020-05-17 13:51:18 +02:00
Alexander Medvednikov
c64f8b0d1f
parser/checker: pub: struct fields
2020-05-09 15:16:48 +02:00
Alexander Medvednikov
207324d15b
strings.builder: remove unused var; clipboard: linux fixes
2020-05-06 11:44:08 +00:00
Alexander Medvednikov
25db5e96a3
strings.builder: fix a memory leak
2020-05-06 11:12:00 +00:00
Alexander Medvednikov
1e4e882bc2
cc/cgen: cached modules fixes
2020-04-28 13:15:37 +02:00
Enzo Baldisserri
7bf8731778
checker: check variable mutability for postfix exprs
2020-04-28 11:20:19 +02:00
Delyan Angelov
54b71242fe
builder: add autofree compatibility; protect against b.str() twice in a row
2020-04-28 11:03:43 +03:00
Alexander Medvednikov
83552a0d58
array: replace make() with the new init syntax
2020-04-26 17:52:27 +02:00
lutherwenxu
dc4db87be3
vlib: use new filename format
2020-04-11 19:51:32 +02:00
Alexander Medvednikov
35fbac8d56
parser/cgen: default struct field values
2020-04-06 14:45:48 +02:00
Alexander Medvednikov
eed7c91e87
move compiler tests from compiler/ to v/
2020-03-27 18:01:46 +01:00
Alexander Medvednikov
e57804e6c2
cgen: generate init()
2020-03-21 09:29:16 +01:00
Alexander Medvednikov
5f61fbcbe3
fix prod build
2020-03-21 07:04:53 +01:00
Alexander Medvednikov
5072320803
cgen/ast/checker: string interpolation
2020-03-21 07:01:11 +01:00
Joe Conigliaro
083964522b
cgen/fmt: fix assign_stmt fix & cgen test & hash tests & fmt
2020-03-11 11:31:24 +11:00
Alexander Medvednikov
de55a26cfe
cgen: lots of fixes
2020-03-10 23:21:29 +01:00
Delyan Angelov
7a72167eb7
strings: optimization of repeat + repeat_string()
2020-02-26 13:22:12 +01:00
spaceface777
ef8c1203b4
cleanup: replace C for loops with range
2020-02-24 17:55:16 +01:00
joe-conigliaro
75eebb516f
fix bug in levenshtein distance & add tests
2020-02-04 04:21:40 +01:00
joe-conigliaro
7f709c3285
update copyright years
2020-02-03 05:00:36 +01:00
Alexander Medvednikov
8d9f89e728
compiler2: proof of concept cgen
2019-12-26 07:47:33 +03:00
Alexey
b88cb1ca69
extend tests for strings
module
2019-12-22 02:05:30 +03:00
Alexander Medvednikov
6210984c97
run vfmt
2019-12-20 02:09:56 +03:00
Alexander Medvednikov
df2f98e276
run vfmt on more files
2019-12-19 02:38:54 +03:00
João Victor Oliveira Couto
b30f989f44
builder_js: fix mutable error
2019-12-16 18:54:44 +03:00
Alexander Medvednikov
78131e78bc
fix sruct access modifiers (pub, pub mut, mut)
2019-12-13 20:00:38 +03:00
Alexander Medvednikov
576618d8cc
string cloning; fix foo.str += 's'
2019-12-12 05:20:52 +03:00
taojy123
28f76f10db
vweb: fix empty post request blocking
2019-12-11 19:20:46 +03:00
Delyan Angelov
13769f440f
vweb: continue after bad http client connection; performance fixes
...
* Enable compiling vweb with -prod (by supressing 'declared and not used' warning about 'reset') .
* Fix http responses (now wrk is happy and shows no errors) by adding a Content-Length header.
* Fix -g compilation for urllib.v .
* vweb: println action= only in debug mode.
* vweb: max request headers counting fix.
* Make vweb.html get a 'ctx mut Context' param, just like the other methods.
* vweb: simplify add_header.
* Use a string builder for the most common html case so that the response http text can be send in one go.
* vweb: reduce _STR/string interpolation usage in the most common html response case.
* vweb: refactor common http response formatting into Context.send_response_to_client/2 method.
2019-12-11 17:32:54 +03:00
Alexander Medvednikov
c9886e6f42
use ++ everywhere
2019-12-08 14:34:51 +03:00
Alexander Medvednikov
cc682eafe1
require ++ instead of += 1
2019-12-08 14:11:25 +03:00
João Victor Oliveira Couto
5a8c07dcf5
strings: builder: write_b()
2019-12-06 23:02:09 +03:00
Delyan Angelov
c73f34cc5f
net: make net.socket.write, net.socket.read_line more robust
2019-11-19 00:13:14 +03:00
Alexander Medvednikov
6ae8457f35
fix strings.Builder.str()
2019-11-17 07:05:13 +03:00
Alexander Medvednikov
d9b29bfb4e
fix a bug in strings.Builder and wrap up vfmt
2019-11-11 08:24:28 +03:00
Alexander Medvednikov
c7f3413d70
more vfmt fixes
2019-11-10 19:49:19 +03:00
joe-conigliaro
59378dce46
compiler/vlib: replace substr/left/right with [start..end]
everywhere
2019-10-27 10:03:15 +03:00
Alexander Medvednikov
4a88a28a3b
make all necessary structs public
2019-10-24 12:51:00 +03:00
Alexander Medvednikov
333f0ab89f
fix v.js test
2019-10-20 20:52:31 +03:00
Alexander Medvednikov
81b1b882fd
bultin: mark unsafe functions
2019-10-20 20:29:24 +03:00
Alexander Medvednikov
9385ed27ae
fix v.js
2019-10-10 01:27:16 +03:00
Alexander Medvednikov
1f6535afb0
array/map: remove _get(), _push() etc
2019-10-10 01:15:19 +03:00
Alexander Medvednikov
2411b8d1e7
module cache fixes; do not allow function names starting with _
2019-10-10 00:44:26 +03:00
Alexander Medvednikov
a9a73d9315
caching modules: almost there
2019-10-09 06:35:58 +03:00
joe-conigliaro
72ae12877e
remvoe dupe in main & fix js string.builder ( #2233 )
2019-10-05 18:07:10 +10:00
Alexander Medvednikov
ed99fc2d42
v.js: fix strings.Builder
2019-10-05 07:40:32 +03:00
Alexander Medvednikov
52f4f4026b
compiler: cache modules
2019-10-04 15:48:09 +03:00
Alexander Medvednikov
841d824216
builtin: a very early version of the hashmap
2019-10-01 06:20:50 +03:00
Alexander Medvednikov
4c898ab6b3
strings: simplify repeat()
2019-09-25 22:08:51 +03:00
Michiel Vlootman
9b7ca248f0
similarity.v: update a comment
2019-09-21 14:59:06 +03:00
Alexander Medvednikov
a94c1556ce
array: remove temporary repeat2()
2019-09-19 05:22:24 +03:00
joe-conigliaro
075a8e5ccb
compiler: improve typo detection
2019-09-15 20:07:12 +03:00
Alexander Medvednikov
5cc81b91cb
JavaSript backend (early stage)
2019-09-15 03:49:57 +03:00
joe-conigliaro
5aaa794519
compiler: clean up the typo check
2019-09-13 16:15:30 +03:00
joe-conigliaro
41734affb3
compiler: detect typos in function/variable/module names
2019-09-13 14:10:24 +03:00
Alexander Medvednikov
52f473d1c7
all: fix immutable fn args
2019-08-07 05:28:00 +02:00
Alexander Medvednikov
7a7b5040e2
http: fix response headers and status code; clean up ft and gg
2019-08-06 03:06:27 +02:00
joe-conigliaro
d3c89273e8
net.urllib module
2019-08-01 15:01:03 +02:00
Alexander Medvednikov
6e6f6bc387
free/malloc fixes
2019-07-21 12:36:21 +02:00