krischerven
ac67b1ea1b
tests: add new type alias syntax tests
2020-04-13 16:44:21 +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
Delyan Angelov
99db5f53f7
repl_test.v: fix compilation (non working ones are for now renamed to .skip)
2020-04-13 11:06:52 +03:00
krischerven
74ba8f5cc9
tests: add testing for !in
2020-04-13 02:29:07 +02:00
krischerven
a0d6651e0e
tests: fix typeof_test
2020-04-13 02:22:14 +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
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
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
0a03797694
tests: run vfmt
2020-04-12 01:41:26 +02:00
Alexey
0f19f9dd51
tests: test call of variadic function with no arguments
2020-04-12 01:37:34 +02:00
Daniel Däschle
be16c5b21d
parser: better error on short init struct
2020-04-11 14:56:55 +03:00
Swastik Baranwal
6ecb6cfe8e
tests: add an operator overloading test
2020-04-11 14:39:51 +03: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
d5fb68e3d6
vfmt: fix struct init; run on struct_test.v
2020-04-10 00:36:50 +02:00
Alexander Medvednikov
9b2511133d
vfmt: lots of fixes; cmd/v: -keepc;
2020-04-10 00:30:43 +02:00
Daniel Däschle
c0d86eb651
cgen: printing pointer should print the address
2020-04-09 15:35:52 +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
Daniel Däschle
1c340174b7
cgen: print nested structs
2020-04-08 22:14:01 +02:00
Daniel Däschle
d38acb5487
cgen: fix enum print case
2020-04-08 18:55:10 +02:00
Daniel Däschle
6bba7d4e3a
cgen: enum str()
2020-04-08 15:54:38 +02:00
Alexander Medvednikov
2e78051933
tests: fix in_expression_test
2020-04-08 13:56:09 +02:00
Delyan Angelov
b9ec1479e4
checker: allow again fallthrough in or{} blocks of option calls without assignment
2020-04-08 02:56:24 +03:00
Delyan Angelov
cb52dd85e7
tests: add an isolated test case for long struct names with capitalization
2020-04-07 22:03:20 +03: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
Daniel Däschle
0024ff848d
parser: check if the last or {} block expression is valid
...
These checks allows for:
a) `x := call() or { 'abc' }`
b) `x := call() or { panic('abc') }`
c) `x := call() or { exit(123) }`
d) `x := call() or { continue }`
e) `x := call() or { break }`
f) `x := call() or { return }`
... but produce errors for:
g) `x := call() or { println('an error') }` , etc.
2020-04-07 17:36:00 +03:00
Alexander Medvednikov
7f516dbae2
cgen: minor optionals fixes
2020-04-06 18:46:50 +02:00
yuyi
4d5fe14968
log: fix example error
2020-04-06 17:22:53 +02:00
Delyan Angelov
75518e5bb9
ci: extract separate working_with_an_empty_struct_test.v
2020-04-05 12:55:54 +03:00
Delyan Angelov
5e76d53fcd
compiler: support default values in optional blocks
2020-04-05 11:59:15 +03:00
joe-conigliaro
97d8633557
checker: constant cycle & test fix
2020-04-04 17:05:26 +11:00
joe-conigliaro
bf59828897
ast: const impl & global scope & objects
2020-04-04 14:14:40 +11:00
Alexander Medvednikov
436ef12730
cgen: str(): handle empty structs
2020-04-03 18:49:15 +02:00
hazohelet
0e6fe0a4f2
V: fix const bugs and pass const_test.v ( #4206 )
...
* fix const bug in v2
* v2: fix const decl
* small comment fix
2020-04-02 19:39:17 +02:00
Alexander Medvednikov
fd12e4e826
fix compiler_test.v
2020-04-02 18:12:10 +02:00
Delyan Angelov
61f79270a8
v2: compiler_test.v should fail on errors.
2020-04-02 19:01:31 +03:00
SleepyRoy
d5b2eb3c23
test: remove old num_lit_call_method
2020-04-02 15:52:46 +02:00
Alexander Medvednikov
4981c5a870
parser: fix public interfaces
2020-04-02 12:53:25 +02:00
Alexander Medvednikov
d57b1ca962
fix valgrind test
2020-04-02 10:44:35 +02:00
SleepyRoy
74bdc57fad
tests: fix num_lit_call_method_test
2020-04-02 00:18:29 +02:00
Alexander Medvednikov
39434155f8
short struct init syntax
2020-04-01 23:23:20 +02:00
Alexander Medvednikov
d9af06f2ad
remove remaining files in vlib/compiler
2020-04-01 22:19:09 +02:00
Alexander Medvednikov
0de853a2ab
v2: lots of minor test fixes
2020-04-01 17:14:21 +02:00
Alexander Medvednikov
5a0bfa03b3
fix tests
2020-04-01 15:39:54 +02:00
Alexander Medvednikov
3dae1cc131
move sdl module to github.com/vlang/sdl
2020-04-01 15:27:28 +02:00
Alexander Medvednikov
7fd81d3abb
parser: fix ^=; disable generics and interface map tests for now
2020-04-01 15:15:21 +02:00
Alexander Medvednikov
b1b811b5ed
v2: static (for translated code only)
2020-04-01 13:38:05 +02:00
Alexander Medvednikov
48832200bb
parser: allow types that start with &&; cgen: allow ++/-- exprs for now
2020-04-01 13:18:58 +02:00