Alexander Medvednikov
905f844b16
cgen: return interface fix
2020-05-30 20:18:03 +02:00
Alexander Medvednikov
1ca7a607d3
checker/cgen: return interfaces
2020-05-30 19:54:16 +02:00
Emily Hudson
a4de507c6d
cgen: panic on assertion failed outside tests
2020-05-30 13:19:52 +02:00
Alexander Medvednikov
bec3e07635
interfaces: fix `is`
2020-05-29 05:54:53 +02:00
Alexander Medvednikov
81b44dc2c9
generics: generic call inside generic call; checker: check mut args at call
2020-05-29 04:30:00 +02:00
pancake
2943bdc1f6
cgen: add support for $if (mach|darwin|hpux|gnu|qnx|bsd)
2020-05-28 13:33:12 +02:00
Delyan Angelov
a3bd8d3e4c
cgen: add trace info about auto str generation
2020-05-28 10:36:29 +03:00
Delyan Angelov
55ef117531
cgen: fix for V structs fields (auto str and json_decode)
2020-05-28 09:55:37 +03:00
yuyi
9cbd9db4e7
cgen: fix swap assign of prefix and postfix expr
2020-05-28 02:22:09 +03:00
Emily Hudson
0b64e2190f
checker,cgen: unpack multi returns in return statements
2020-05-27 15:47:38 +03:00
Uwe Krüger
013fdb8a4b
checker: restrict numeric promotions to cases where no data is lost
2020-05-27 05:42:48 +02:00
yuyi
bb48851092
cgen: fix mutliple_assign swap
2020-05-26 18:00:51 +02:00
Julia K
2b27072fac
compiler: new attributes, prelude customization
2020-05-26 14:12:18 +02:00
Emily Hudson
748b1d3381
cgen: use typ() for array type
2020-05-26 14:11:59 +02:00
Alexander Medvednikov
0f92800921
cgen: string buffer fix
2020-05-26 00:04:13 +02:00
Alexander Medvednikov
53a10eb312
cgen: use STR_TMP with -autofree
2020-05-25 12:46:18 +02:00
Delyan Angelov
96808a0e2a
cgen: generalize _vcleanup of array/string consts + valgrind with tcc
2020-05-25 10:24:19 +03:00
Delyan Angelov
ae03aab03e
cgen: autofree math.bits and strconv.ftoa constants
2020-05-25 09:53:30 +03:00
Delyan Angelov
6683f98eba
cgen: add support for `-printfn _vcleanup` and `-printfn _vinit`
2020-05-25 09:47:00 +03:00
Alexander Medvednikov
f41e2c0a4b
string: make replace() clone for now; parser: comptime method
2020-05-25 08:17:36 +02:00
Alexander Medvednikov
1b36d7a037
cgen: handle c++ keyword
2020-05-25 05:46:58 +02:00
Alexander Medvednikov
1ef8eacd6e
checker/gen: more generics fixes; ComptimeCall
2020-05-25 05:32:36 +02:00
yuyi
ec7863d174
cgen: fix array_init of struct error
2020-05-25 04:45:16 +02:00
Uwe Krüger
fd4d28b7b6
tests: update for stricter type checks
2020-05-24 21:07:32 +02:00
Uwe Krüger
7c4f2b535b
cgen: prepare any_in, any_float on v side
2020-05-24 15:26:43 +03:00
Delyan Angelov
ddcb5f7da3
gen: fix autogenerated print methods for vargs
2020-05-24 15:05:19 +03:00
Alexander Medvednikov
67750c91d7
generics: lots of fixes
2020-05-24 04:43:03 +02:00
Delyan Angelov
70f0115e27
options: use panic_debug() for opt()? calls in main with -cg
2020-05-23 11:43:20 +03:00
Enzo Baldisserri
801bca1ef2
compiler: propagate optional
2020-05-23 08:51:15 +02:00
Delyan Angelov
aef751861d
cgen: fix `_ := []byte{init:1}`
2020-05-22 18:17:20 +03:00
Enzo Baldisserri
1633675c11
gen: fix nested `or`
2020-05-21 22:35:43 +02:00
Alexander Medvednikov
ce1a181699
all: generic functions
2020-05-21 03:58:53 +02:00
Tanel Liiv
c9f3a05ef6
checker: fix map/filter called with a plain fn argument
2020-05-20 15:28:33 +03:00
yuyi
b3b86ea6d7
cgen: fix array_init has len but no init error
2020-05-19 18:33:24 +02:00
spaceface777
b10df252dc
all: replace `is_c`, `is_js` with `language`
2020-05-19 17:12:47 +02:00
yuyi
74686d0ec4
test: fix alias type errors and type_test.v
2020-05-19 15:04:51 +03: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
Alexander Medvednikov
4f307c1a78
checker: requre & in struct init; http: chunked encoding
2020-05-18 05:11:00 +02:00
yuyi
6855996cca
cgen: fix array_init_with_default
2020-05-16 19:05:26 +02:00
yuyi
655d9bda94
cgen: remove extra `;` from if_expr
2020-05-16 17:09:57 +02:00
Enzo Baldisserri
f44a40eee0
checker: check incorrect names
2020-05-16 16:12:23 +02:00
yuyi
9b6ee8e77d
cgen: array_init_with_default
2020-05-16 15:21:37 +02:00
Tanel Liiv
44502a3fb2
parser: return multi expr
2020-05-15 23:14:53 +02:00
Alexander Medvednikov
c4ca6a9113
sokol: make examples compile
2020-05-15 18:55:29 +02:00
yuyi
8500c8885c
cgen: fix optional_void error; handle `?` return type
2020-05-15 15:55:03 +02:00
Enzo Baldisserri
d60233b618
cgen: simplify for in range
2020-05-14 22:22:32 +02:00
Enzo Baldisserri
fd0d833e33
gen: if expressions with multiple statements
2020-05-14 17:15:25 +02:00
wilesun
2a9cbbe157
cgen: handle sizeof(C.struct)
2020-05-14 17:14:59 +02:00
Alexander Medvednikov
2369a5c8c6
cgen: handle `is` for interfaces
2020-05-14 16:56:45 +02:00
Alexander Medvednikov
ab7bc760c6
cgen: new Option part 1
2020-05-13 21:59:08 +02:00
Enzo Baldisserri
172e4ff853
cgen: simplify if guard else clause
2020-05-13 18:38:00 +02:00
Tanel Liiv
af334e320c
cgen: dereference in one place and fix
2020-05-13 01:01:34 +02:00
Kris Cherven
d359a7aefb
cgen: fix a goto error
2020-05-11 23:49:08 +02:00
kdmult
ea8fcb3981
cgen: fix nested conditional statements
2020-05-11 15:11:48 +02:00
Ned Palacios
38277d1dac
cgen: fix gen_str_for_struc when called on a struct with a pointer field
2020-05-11 11:08:21 +03:00
joe-conigliaro
1b3cd7abe0
cgen: fix sum type assign/push from in match branch & type mod
2020-05-11 16:59:55 +10:00
yuyi
64ba59590e
cgen: fix multiple assign error
2020-05-11 09:45:11 +03:00
Enzo Baldisserri
b09fd66aa2
gen: fix interface pointers
2020-05-10 21:16:22 +02:00
Alexander Medvednikov
a2d120b583
cgen: fix reassignment of optionals
2020-05-10 17:41:33 +02:00
Sumeet Chhetri
8dc0c5a699
cgen: C++ compiler support - Part 1
2020-05-10 16:26:21 +02:00
joe-conigliaro
a73660a4c3
checker/cgen: simplify assigning fn to var
2020-05-11 00:13:30 +10:00
Alexander Medvednikov
dea9ca2491
cgen: fix a big with &Foo{} init
2020-05-09 15:23:48 +02:00
Alexander Medvednikov
c64f8b0d1f
parser/checker: pub: struct fields
2020-05-09 15:16:48 +02:00
Tanel Liiv
7815a5495c
checker: handle multireturn fn calls as if/match last expressions
2020-05-08 22:49:45 +02:00
Alexander Medvednikov
c29f76454e
cgen: clone strings in struct_init()
2020-05-08 15:07:53 +02:00
Alexander Medvednikov
2f4fc86d58
checker: fix unknown var enum crash
2020-05-08 15:00:06 +02:00
Alexander Medvednikov
847a1035a5
cgen: use tos_lit
2020-05-08 13:25:23 +02:00
Delyan Angelov
fec7f0f0b9
cgen: fix auto .str() generation for []&T, and `fn (t &T) str() string{}`
2020-05-08 12:48:07 +03:00
Delyan Angelov
7207a4970b
solaris: fix tests
2020-05-07 16:19:21 +00:00
Alexander Medvednikov
8cfb2ad6c9
string: is_lit
2020-05-07 18:05:57 +02:00
Alexander Medvednikov
ef387779bf
cgen: fix -autofree
2020-05-07 17:51:30 +02:00
Alexander Medvednikov
3c6e090ae3
ci: test broken -autofree
2020-05-07 17:45:00 +02:00
Alexander Medvednikov
be063d740b
ci: test self compilation with -autofree
2020-05-07 17:37:12 +02:00
Tanel Liiv
d0afa748ff
cgen: optional multiple return values
2020-05-07 15:36:04 +02:00
Alexander Medvednikov
12221fb999
cgen: fix msvc struct init
2020-05-07 13:11:24 +02:00
Alexander Medvednikov
6ff93f270c
cgen: simplify struct_init()
2020-05-07 13:00:42 +02:00
Uwe Krüger
59aa31cee5
cgen: string interpolation: optimize away some partial strings of 0 length
2020-05-07 04:34:18 +02:00
wilesun
19390871e9
json: handle external types
2020-05-07 04:33:19 +02:00
Delyan Angelov
e33805b2b3
json.decode: fix expressions in the second argument, also fixes news_fetcher.v
2020-05-06 21:44:50 +03:00
Tanel Liiv
b5a1544bf8
parser: allow re-assigning fns to variables
2020-05-06 20:09:29 +02:00
Delyan Angelov
f638caef39
compiler: v -autofree can now compile itself
2020-05-06 19:03:51 +03:00
Alexander Medvednikov
8d2a4d2436
clipboard: make compile on linux
2020-05-06 12:00:52 +00:00
Alexander Medvednikov
25db5e96a3
strings.builder: fix a memory leak
2020-05-06 11:12:00 +00:00
yuyi
c653977c15
cgen: fix struct with map field str() error
2020-05-06 09:08:48 +03:00
Alexander Medvednikov
25b536d03f
cgen: str: do not free "true"/"false" literals
2020-05-05 23:25:14 +02:00
Alexander Medvednikov
473ffb5489
builtin: fix a leak in array_str
2020-05-05 18:04:43 +00:00
Delyan Angelov
9e715b8701
cgen: use c_name() while generating code for `or {}`
2020-05-05 19:28:25 +03:00
Alexander Medvednikov
ff88906e9a
cgen: add `new` to reserved words
2020-05-05 16:50:59 +02:00
Tanel Liiv
b16281d6e4
cgen: pass around functions
2020-05-05 16:21:21 +02:00
Alexander Medvednikov
ef6c418eb6
json: decode arrays
2020-05-05 13:23:44 +02:00
Steve Phillips
84fc587ec2
cgen: use a temp var in map()
2020-05-05 10:29:23 +02:00
yuyi
6aca3be474
cgen: fix []map[string]string.str() error
2020-05-05 08:46:19 +03:00
Uwe Krüger
a4b6c3fa5d
cgen: hex representation of signed and pointers
2020-05-05 00:24:33 +02:00
Delyan Angelov
1c945faa15
cgen: fix _to_Interface_INAME conversion fns generation
2020-05-05 00:01:54 +03:00
Delyan Angelov
b5fda6e410
cgen: skip interface outside methods, while generating _interface_methods struct
2020-05-04 22:56:58 +03:00
Delyan Angelov
d7e7113047
cgen: fix `for char in nums {}`
2020-05-04 18:57:33 +03:00
Enzo Baldisserri
8fd69e845f
cgen: fix using pointer as interface receiver
2020-05-04 14:21:03 +02:00
Enzo Baldisserri
4b3ce79e84
interface: support arguments in methods and simplify
2020-05-04 00:14:59 +02:00
Alexander Medvednikov
de749e9d3b
parser/cgen: interface <<; `any` type
2020-05-03 18:08:45 +02:00
Alexander Medvednikov
361fad9231
tests: disable valgrind test until fn scopes are fixed
2020-05-03 16:29:15 +02:00
Delyan Angelov
7e4e3abc2c
compiler: circuimvent the dependency cycle v.ast <-> v.table
2020-05-02 22:52:10 +03:00
Tanel Liiv
68ca8ab8a4
array: nested map()
2020-05-02 15:26:58 +02:00
Alexander Medvednikov
44c00199b6
cgen: fix fixed array consts and pointer interfaces
2020-05-02 15:18:58 +02:00
Alexander Medvednikov
06d533b0c1
cgen: clean up _STR
2020-05-02 11:11:32 +02:00
Alexander Medvednikov
06173834c0
cgen: interface_call()
2020-05-02 10:10:52 +02:00
Alexander Medvednikov
7a51d4d796
cgen: revert `new`
2020-05-02 00:59:06 +02:00
Alexander Medvednikov
7dc98120c0
cgen: vfmt -live fix; add new to c_reserved
2020-05-02 00:45:45 +02:00
Uwe Krüger
170ee4312f
cgen: string interpolation field width support for large integers and utf8 strings
2020-05-02 00:43:59 +02:00
Alexander Medvednikov
2f64594ce0
cgen: more interface fixes
2020-05-02 00:28:46 +02:00
Delyan Angelov
7038f59ca5
compiler: add back support for -live
2020-05-02 01:14:44 +03:00
eyelash
130324df76
compiler: remove debug prints
2020-05-02 00:10:36 +02:00
Alexander Medvednikov
0106eb1cf6
cgen: fix thread wrapper
2020-05-01 12:32:10 +02:00
Alexander Medvednikov
0b8a0d1640
checker: fix _ check
2020-05-01 12:22:39 +02:00
Tanel Liiv
182e7071bf
array: map() function
2020-05-01 00:29:54 +02:00
Alexander Medvednikov
250dea7bd1
cgen: another imported interface fix
2020-04-30 18:23:17 +02:00
joe-conigliaro
98cd013908
cgen: fix interface struct sorting
2020-04-29 21:08:39 +10:00
Alexander Medvednikov
2fc05b814c
all: interface arrays
2020-04-29 12:21:15 +02:00
Alexander Medvednikov
1e4e882bc2
cc/cgen: cached modules fixes
2020-04-28 13:15:37 +02:00
joe-conigliaro
ef4f4825ac
cgen: auto dereference for optional
2020-04-28 15:59:41 +10:00
Enzo Baldisserri
682838a0cf
checker: check array and fields mutability
2020-04-27 22:53:26 +02:00
joe-conigliaro
9f76a7b250
parser: simplify unused vars & add loop/if vars etc
2020-04-27 23:16:31 +10:00
yuyi
e9f764db4f
cgen: uniform string output format
2020-04-27 14:48:28 +02:00
Alexander Medvednikov
fde929ee30
cgen: remove tos3() call: part 1
2020-04-27 12:10:08 +02:00
yuyi
99a7b69578
cgen: optimize map_to_string format
2020-04-27 10:52:21 +02:00
Delyan Angelov
c84dee5968
profile: move profiling related logic into vlib/v/gen/profile.v
2020-04-27 09:40:13 +03:00
Alexander Medvednikov
f23948010a
parser: new array init syntax
2020-04-26 17:28:48 +02:00
yuyi
9f4d498ff1
all: update`import ()` and `[]array`
2020-04-26 13:49:31 +02:00
Alexander Medvednikov
3ab8dc0092
parser: array init: `[]string` => `[]string{}`
2020-04-26 09:17:17 +02:00
yuyi
9cfb1e3bf7
cgen: fix struct with fixed array error
2020-04-26 06:54:14 +02:00
yuyi
541b058e90
all: use `a !in b` instead of `!(a in b)`
2020-04-26 06:39:23 +02:00
Alexander Medvednikov
e0f9c042c1
cgen: interface fixes
2020-04-25 21:24:12 +02:00
Alexander Medvednikov
b7e5be41f5
checker/cgen: `as` fixes
2020-04-25 18:41:12 +02:00
yuyi
c26e83f58a
array: fix fixed array errors
2020-04-25 18:26:38 +02:00
Enzo Baldisserri
fb54a2635c
fmt: lots of fixes
2020-04-25 17:49:16 +02:00
joe-conigliaro
aacc3c6f7e
cgen: generate str for variadic ( #4587 )
2020-04-25 22:23:47 +10:00
Delyan Angelov
eecf92cdb0
cgen: implement -profile support.
2020-04-25 13:05:49 +03:00
Delyan Angelov
e0ab318f56
cgen: add support for `v -printfn main file.v`
2020-04-25 11:15:57 +03:00
Alexander Medvednikov
9229a963ed
array: use __new_array everywhere
2020-04-25 09:10:54 +02:00
joe-conigliaro
fbcdffbbc8
table: move Type functions to methods
2020-04-25 17:08:53 +10:00
Alexander Medvednikov
48857090fc
runtime `as` type check: part 2
2020-04-25 08:42:23 +02:00
Alexander Medvednikov
2d187fb951
runtime `as` type check: part 1
2020-04-25 08:36:53 +02:00
Alexander Medvednikov
f1f9e423c3
interfaces: preparatory fixes
2020-04-25 08:00:44 +02:00
Enzo Baldisserri
a924defb94
checker: check `in` left type
2020-04-25 06:14:17 +02:00
Delyan Angelov
f6f204387d
cgen: fix for msvc
2020-04-24 18:44:25 +03:00
Delyan Angelov
c6a829ce82
cgen: support for error('abc').str() and printing errors
2020-04-24 18:35:33 +03:00
Enzo Baldisserri
323ca2b3bb
checker: check duplicates on match with no else
...
Refactor match duplication test to work even if there is not else, and to include every expression.
Add tests for duplicate expressions in match.
2020-04-24 17:04:39 +03:00
yuyi
afa9d42ff0
cgen: fix gen_str_for_array_fixed error
2020-04-24 12:36:45 +02:00
Delyan Angelov
7a132e5c79
cgen: cleaner comptime ifdefs .
2020-04-24 08:42:31 +03:00
yuyi
998fc8fc07
cgen: add gen_str_for_array_fixed
2020-04-24 07:32:27 +02:00
Delyan Angelov
4f4567513e
comptime: fix `$if debug {}` when giving -cg or -d debug
2020-04-23 18:03:07 +03:00
Delyan Angelov
adb8fb1dc6
comptime: fix custom -d flags and `$if x? {}`. Fixes ftp_test.v .
2020-04-23 17:52:44 +03:00
Enzo Baldisserri
7e400124e8
parser: allow blank ident in nested loops
2020-04-23 12:00:51 +02:00
Kris Cherven
d871595437
all: replace `var` with `mut`
2020-04-23 01:16:58 +02:00
Alexander Medvednikov
d7ee4755c2
parser/cgen: interfaces (part 1)
2020-04-22 20:23:53 +02:00
Enzo Baldisserri
fecf4ddf65
cgen: fix optional pointers
2020-04-22 20:12:30 +02:00
Delyan Angelov
4b8ed3f831
cgen: fixes for ustring, makes utf8_util_test.v pass
2020-04-22 10:35:14 +03:00
Kris Cherven
b288ecb795
cgen: add map string generation
2020-04-22 04:00:38 +02:00
Kris Cherven
155891a4e0
parser: add unused variable warning
2020-04-22 01:52:56 +02:00
Uwe Krüger
08fac28c52
cgen: fix string interpolation for non-standard integer types
2020-04-22 01:48:53 +02:00
joe-conigliaro
b9c0d2d362
cgen: fix passing high order function with body
2020-04-21 22:45:20 +10:00
Delyan Angelov
7c1d6b60c2
cgen: add g.auto_str_funcs, print &Struct pointers with enum fields
2020-04-21 13:32:17 +03:00
joe-conigliaro
abf5942433
parser/cgen: anon fn var & calling ( #4534 )
2020-04-21 13:23:36 +10:00
Alexander Medvednikov
ee2e83fef0
go back to `mut`. decisions, decisions...
2020-04-21 05:11:50 +02:00
Alexander Medvednikov
1bf094fbca
parser: mut in receivers
2020-04-21 05:07:49 +02:00
Alexander Medvednikov
cc0e0ed281
fmt: single line match fix; x64: minor fixes
2020-04-21 04:51:53 +02:00
Alexander Medvednikov
2642f6a0da
cgen: remove _PUSH
2020-04-20 09:04:17 +02:00
Alexander Medvednikov
ee2f1652b5
fmt: add EOL
2020-04-20 08:30:42 +02:00
Alexander Medvednikov
c1fc768c1b
fmt: run on cmd/v; cgen: fix anonymous functions
2020-04-20 07:04:31 +02:00
Alexander Medvednikov
19a5436118
cgen: use faster array_push instead of _PUSH; re-fmt cgen.v
2020-04-20 03:54:41 +02:00
yuyi
27e04748ed
cgen:gen_str_for_array
2020-04-19 10:42:34 +02:00
Alexey
3ee858cd79
cgen: fix struct initialization bugs
2020-04-19 04:44:39 +02:00
Tim Basel
73073cd954
parser: anonymous functions (part 1)
2020-04-17 21:59:19 +02:00
yuyi
420ecaf31d
cgen: gen_str_for_array()
2020-04-17 16:10:41 +02:00
Daniel Däschle
402e55d115
ast: expr.Position; struct field refactoring
2020-04-17 02:38:39 +02:00
yuyi
8bb11d9035
cgen: fix string_interpolation_struct_test.v error
2020-04-17 01:45:42 +02:00
Enzo Baldisserri
051cc732bb
cgen: generate typeof for functions
2020-04-16 21:04:27 +02:00
yuyi
dee64347e0
cgen: fix const_embed_test.v error
2020-04-16 19:43:39 +02:00
Alexander Medvednikov
714ff50322
fmt: use the new receiver syntax
2020-04-16 15:42:40 +02:00
Alexander Medvednikov
af224b4933
parser/cgen: is keyword
2020-04-16 15:32:14 +02:00
Delyan Angelov
8a1248b2e7
builder: restore module import cycle detection/topological reorder
2020-04-16 12:29:36 +03:00
yuyi
54a02996f2
cgen: fix string interpolation float type
2020-04-16 07:30:25 +02:00
joe-conigliaro
c3ddaf16ec
cgen: fix sum type casting for array push
2020-04-16 15:18:33 +10:00
Delyan Angelov
4b3c44cfd7
Revert "tetris: part 1 of fixing building it with v2"
...
This reverts commit d42725aafe
.
2020-04-16 01:16:54 +03:00
Delyan Angelov
d42725aafe
tetris: part 1 of fixing building it with v2
2020-04-16 00:35:16 +03:00
Kris Cherven
a3ab5df2ed
cgen: prepend __ to new_array
2020-04-15 20:12:06 +02:00
Alexander Medvednikov
da28bc7026
Revert "fmt: `(var f Foo)`"
...
This reverts commit 4b110756e0
.
2020-04-15 04:15:42 +02:00
Alexander Medvednikov
4b110756e0
fmt: `(var f Foo)`
2020-04-15 03:56:16 +02:00
Kris Cherven
4dd8796dba
cgen: fix assignment to nested maps
2020-04-15 02:42:00 +02:00
Alexander Medvednikov
f34352faf9
fmt: use var instead of mut
2020-04-15 01:55:51 +02:00
Alexander Medvednikov
efaec8be8e
token/parser: var keyword
2020-04-15 01:45:27 +02:00
Alexander Medvednikov
deab448d93
cgen: fix array[i] &=, |= etc
2020-04-14 19:36:52 +02:00
Alexander Medvednikov
233ae3f772
fmt: use `import module` syntax
2020-04-14 19:32:23 +02:00
Alexander Medvednikov
ec10831318
parser: `[]int{cap:cap, len:len}` syntax; minor fixes
2020-04-14 18:10:16 +02:00
Delyan Angelov
c04c973f84
cgen: use a temp variable for the array part inside 'for x in array{}'
2020-04-14 13:22:58 +03:00
yuyi
956651384c
cgen: fix math/complex_test.v
2020-04-14 07:44:19 +02:00
Daniel Däschle
12e48c6fe2
checker: check match for exhaustion
2020-04-14 01:03:31 +02:00
Alexander Medvednikov
1185f04868
json: encode
2020-04-14 00:37:47 +02:00
krischerven
8c0b25a2ab
cgen: fix printing alias types
2020-04-13 20:07:25 +02:00
Alexander Medvednikov
24958df565
parser: do not allow duplicate fns; cgen: move fn code to fn.v
2020-04-13 19:59:57 +02:00
yuyi
fb4cfa72cd
cgen: fix str() for arrays
2020-04-13 19:18:22 +02:00
Daniel Däschle
8cbdb75dd6
cgen: fix match expr multiline error
...
* cgen: fix match expr multiline error
* Support for multiple statements in the else part of the match.
* Add a test for the match expression with multiple statements.
2020-04-13 13:05:38 +03:00
krischerven
78f9f25a00
cgen: fix !in not working with maps
2020-04-13 02:22:55 +02:00
Enzo Baldisserri
da5a1e458b
cgen: fix match expr in assert
2020-04-13 01:53:26 +02:00
Alexander Medvednikov
0db0c642c3
vfmt: add missing imports automatically
2020-04-12 17:45:04 +02:00
Daniel Däschle
d55f4ab097
cgen: fix error priting struct which has .str already
2020-04-12 16:25:02 +03:00
Daniel Däschle
5818956cdc
cgen: % escape in string interpolated literals
...
* cgen: % escape in c call to _STR
* tests: add test for string % escape
* Add a test for the % escaping when interpolating inside strings
2020-04-12 16:24:23 +03:00
ka-weihe
e247690fe1
map: fast_string_eq and improved comments
...
* improved comments and fast_string_eq
* make it pass CI
* enumerate traits
* Add parameter back
* remove space
* remove parameter
* Allow bootstrap compilation in one step with old vc (add new_map/2 shim).
2020-04-12 15:10:06 +03:00
Daniel Däschle
79dad0bca9
parser: fix enum default value in struct
...
* parser: fix enum default value in struct
* Add a test for the enum default values in structs.
* Fix compilation of vfmt.
* Run vfmt over enum_default_value_in_struct_test.v
* Cleanup spurious , in vfmt output for enum declarations
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2020-04-12 13:35:54 +03:00
krischerven
1abdf2d68f
cgen: fix missing defer in fn main()
2020-04-12 01:38:14 +02:00
Alexander Medvednikov
581d836de6
!in operator
2020-04-11 21:31:54 +02:00
Alexander Medvednikov
f91e3a5d3c
cgen: arr[i] +=, /=, -=
2020-04-11 19:07:03 +02:00
Alexey
0050c1915b
cgen: call module `init` function if available
2020-04-11 18:38:51 +02:00
Alexey
df825506fd
cgen: fix check for array equality
2020-04-11 17:25:25 +02:00
Alexander Medvednikov
63d747042e
cgen: fix sizeof(&int)
2020-04-11 16:24:25 +02:00
Delyan Angelov
61c1535199
assert: generate tos3/1 calls instead of _STR (bugfix)
2020-04-11 16:18:09 +03:00
Delyan Angelov
b10fcc79ba
comptime: fix #ifdef/#endif generation
2020-04-11 12:41:48 +03:00
Delyan Angelov
ba799b3f85
builder: support v.mod/@VROOT, fix -cflags and -cache
2020-04-11 09:57:31 +03:00
Alexander Medvednikov
b95a47b5a7
checker: check fn main(); vfmt: fix for{}, module and module comments
2020-04-10 22:27:54 +02:00
Delyan Angelov
217e6f3b8e
checker/parser: allow for fixed array with sizes defined with a const
2020-04-10 22:01:22 +03:00
Alexander Medvednikov
f76931c01e
cache builtin modules
2020-04-10 18:11:43 +02:00
Daniel Däschle
42b3b19af4
checker: fix checker enum infix error
2020-04-10 15:44:01 +03:00
yuyi
7f87ac996d
test: fix vlib/math/big/big_test.v
2020-04-10 12:26:15 +03:00
Delyan Angelov
7d564e9791
cgen: skip inc generation for ForCStmt, when empty in the v source
2020-04-10 10:00:14 +03:00
Daniel Däschle
320fad49c5
checker: check enum
2020-04-09 19:23:49 +02:00
Daniel Däschle
c0d86eb651
cgen: printing pointer should print the address
2020-04-09 15:35:52 +02:00
Alexander Medvednikov
f508955b64
vfmt: fix mod.Type; run vfmt on ast.v
2020-04-09 15:33:46 +02:00
Alexander Medvednikov
d7ae9d7279
cgen: optional fixes; make http compile
2020-04-09 14:03:47 +02:00
Daniel Däschle
3fbf91a044
cgen: printing pointers
2020-04-09 12:29:29 +02:00
krischerven
8f8f8c418e
cgen: implement equality on arrays
2020-04-09 03:55:37 +02:00
ka-weihe
77d41d03f5
cgen: inline
2020-04-09 00:35:13 +02:00
Alexander Medvednikov
3f480a358e
fix type_alias test
2020-04-08 22:34:21 +02:00
Daniel Däschle
1c340174b7
cgen: print nested structs
2020-04-08 22:14:01 +02:00
Alexander Medvednikov
a08e64f37f
cgen: operator overloading
2020-04-08 22:12:42 +02:00
Daniel Däschle
d38acb5487
cgen: fix enum print case
2020-04-08 18:55:10 +02:00
Alexander Medvednikov
7a218286b3
cgen: fix returning optional consts; fix csv test
2020-04-08 17:21:36 +02:00
krischerven
bcb9d90abb
cgen: remove redundant spaces in generated C
2020-04-08 16:52:07 +02:00
Daniel Däschle
6bba7d4e3a
cgen: enum str()
2020-04-08 15:54:38 +02:00
Alexander Medvednikov
eb78396307
parser: fix prefix precedence
2020-04-08 13:53:11 +02:00
Delyan Angelov
ef19aa1de6
assert: fix line position, pretty print float literals and casts
2020-04-08 05:47:29 +03:00
Delyan Angelov
3bad02abdd
cgen: do comparison of f32/f64 values for == and != by calling f64_eq(a,b) and f64_ne(a,b)
2020-04-08 03:51:06 +03:00
Alexander Medvednikov
7ff0c3aaa9
cgen/parser: fix unions
2020-04-08 01:20:55 +02:00
Alexander Medvednikov
d54150cd22
vfmt: fix struct init indent and wrapped lines
2020-04-08 00:59:28 +02:00
Alexander Medvednikov
2fbed2f880
cgen: fix _ = ...
2020-04-08 00:46:16 +02:00
Daniel Däschle
59ac0bd46b
cgen: print bool correctly in interpolation
2020-04-07 23:26:20 +02:00
Alexander Medvednikov
6bbd1943dd
cgen: fix &string cast; vfmt fixes
2020-04-07 18:51:44 +02:00
Daniel Däschle
4aedef367c
cgen: print bool and string correctly in struct
2020-04-07 17:52:15 +02:00
Alexander Medvednikov
890940292b
Revert "cgen: print bool in struct correctly"
...
This reverts commit 78440be2b2
.
2020-04-07 12:56:05 +02:00
Daniel Däschle
78440be2b2
cgen: print bool in struct correctly
2020-04-07 12:39:10 +02:00