Commit Graph

93 Commits (b0053d891018499fcf5cbe98f2738e3135ef31cf)

Author SHA1 Message Date
Swastik Baranwal 0c987f433d
string: enable test for string escaping (#6688) 2020-10-27 15:25:44 +01:00
Alexander Medvednikov 55536bb364 autofree: handle more statements 2020-10-18 00:48:06 +02:00
Delyan Angelov 46c5a2c8fc v test-fmt: fix some embedded comments in expressions 2020-10-14 22:52:33 +03:00
Delyan Angelov ce302c29e4 builtin: support also [abc,def].sort(b>a) 2020-10-06 21:33:15 +03:00
Daniel Däschle abc98c273c
parser: require assign on type alias (#6477) 2020-09-25 12:02:32 +02:00
Alexander Medvednikov 403cd0d915 Revert "gen: scape string function in gen/str.v (#6452)"
This reverts commit 60fbcc37fc.
2020-09-24 18:19:18 +02:00
Marcin 60fbcc37fc
gen: scape string function in gen/str.v (#6452) 2020-09-24 18:18:10 +02:00
Swastik Baranwal 077b597bd8
scanner/parser: change error msgs for `\0` and `\x00` and add error for r`byte` and c`byte` (#6436) 2020-09-21 17:34:24 +03:00
Swastik Baranwal 1c886ad067
scanner: add check for `!is_raw` for null `\0` (#6427) 2020-09-19 19:09:18 +03:00
Oghogho Odemwingie 332f3a924c
builtin: consume matched string length in string.replace_each (#6349) 2020-09-12 02:31:06 +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
Alexander Medvednikov 64f218e943 string: fix all cap .title() test 2020-08-09 04:09:48 +02:00
Alexander Medvednikov c65dbe51d6 parser: c2v fixes 2020-08-09 03:58:14 +02:00
Lukas Neubert f2c639c869
builtin: add string.contains_any() (#5963) 2020-07-29 21:48:50 +02:00
Delyan Angelov 276c1de190 unsafe: tag with unsafe{} some more pointer manipulations 2020-07-22 21:42:51 +03:00
Delyan Angelov e5a5e76a30 cgen: fix for passing functions as voidptr args 2020-07-13 19:45:13 +03:00
Swastik Baranwal b5b5176f9b
string: add filter method (#5812) 2020-07-12 21:07:28 +03:00
Delyan Angelov 78e1127d99
cgen: treat the main module like any other v module 2020-07-01 00:53:53 +02:00
nyaascii f10d2bb75f
string: fix trim_prefix and trim_suffix methods (#5572) 2020-06-30 15:44:53 +02:00
Alexander Medvednikov 325a7c7ec5 orm: more fixes and tests 2020-06-17 14:29:44 +02:00
Swastik Baranwal 0052ab71e9
string: add map method 2020-06-17 12:26:55 +02:00
yuyi 2ef0f15b34
string: fix contains behaviour (closes #5371) 2020-06-14 19:24:15 +10:00
Alexander Medvednikov 4f307c1a78 checker: requre & in struct init; http: chunked encoding 2020-05-18 05:11:00 +02:00
Enzo Baldisserri f44a40eee0
checker: check incorrect names 2020-05-16 16:12:23 +02:00
Swastik Baranwal 04744a5390
string: add trim_prefix and trim_suffix 2020-05-15 19:37:14 +02:00
yuyi e0e064ff08
scanner: fix string slash line breaks error 2020-05-04 10:19:23 +02:00
Delyan Angelov 4b8ed3f831 cgen: fixes for ustring, makes utf8_util_test.v pass 2020-04-22 10:35:14 +03:00
yuyi 0ced7116b6
string: add is_upper/is_lower and fix parser.match_expr error
* string: add is_upper/is_lower and fix parser.match_expr error

* to_capital => capitalize, to_title => title

* is_titled => is_title, is_capitalized => is_capital
2020-04-12 13:09:05 +03:00
Alexander Medvednikov 4b029567e5 tests: test string literal indexing and mutable array filter 2020-04-11 23:32:00 +02:00
yuyi ea960b2ce2
parser: fix inter literal format error 2020-04-11 17:25:39 +02:00
Major Taylor f099f90f50
string: fix trim_right, add tests 2020-04-06 14:30:25 +02:00
Alexander Medvednikov 461a5b2c18 cgen: fix raw strings 2020-04-02 10:15:35 +02:00
Delyan Angelov f489c89987
v2: more informative assert output; string interpolation formatting 2020-03-26 19:17:14 +01:00
Alexander Medvednikov eb57f192d4 cgen: fix test 2020-03-26 17:21:52 +01:00
Alexander Medvednikov 75c2ef7947 cgen: fix octal and hex int literals 2020-03-26 17:14:24 +01:00
Alexander Medvednikov ed3e0c43bc cgen: for c in string; short struct init syntax fixes; 2020-03-26 17:03:14 +01:00
Alexander Medvednikov fc86269bc9 checker: array str fixes 2020-03-26 11:32:32 +01:00
Major Taylor e2eb0f17d7
string: separate strip_margin tests into different functions 2020-03-17 02:49:51 +01:00
Alexander Medvednikov d39dd53998 string: bring back test_strip_margins 2020-03-16 15:45:54 +01:00
Alexander Medvednikov 98fc9ab65b string: disable strip_margins test for now 2020-03-15 23:21:32 +01:00
Major Taylor 2d5c7c8e93
string: add `strip_margin` 2020-03-15 05:46:12 +01:00
Alexander Medvednikov cd8a5d1f2e fix parser_test.v and string_test.v 2020-03-04 17:39:27 +01:00
Alexey 632a538eb3
string: update `string.repeat` behavior
Panic if a repeat count is negative.
Return an empty string if a repeat count is zero.
2020-02-29 15:25:31 +01:00
Alexey e4de1e1e89
string: add more test cases 2020-02-20 20:14:21 +01:00
yuyi 8be07194c7
string: fix capitalize 2020-02-20 11:33:38 +01:00
Delyan Angelov f76651604d
compiler: bugfix for raw'"' 2020-02-09 16:29:05 +01:00
Alexey 1eeee40278
string: split into lines correctly 2020-02-09 09:23:57 +01:00
joe-conigliaro 7f709c3285
update copyright years 2020-02-03 05:00:36 +01:00
Khairul Azhar Kasmiran edc44993d1 string: add another test for split_nth() 2020-01-25 19:12:36 +01:00