Alexander Medvednikov
233ae3f772
fmt: use `import module` syntax
2020-04-14 19:32:23 +02:00
Alexander Medvednikov
211275ab49
fmt: always use import() syntax
2020-04-14 18:24:19 +02:00
Alexander Medvednikov
ec10831318
parser: `[]int{cap:cap, len:len}` syntax; minor fixes
2020-04-14 18:10:16 +02:00
Daniel Däschle
12e48c6fe2
checker: check match for exhaustion
2020-04-14 01:03:31 +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
Alexander Medvednikov
c36984cc94
fmt: handle indents
2020-04-13 16:36:32 +02:00
Alexander Medvednikov
77fcd572dc
fmt: remove unused imports
2020-04-13 15:05:51 +02:00
Alexander Medvednikov
6ada43df61
fmt: test automatic import insertion
2020-04-12 17:57:05 +02:00
Alexander Medvednikov
810a0725ec
tests: fix fmt tests
2020-04-12 17:49:31 +02:00
Alexander Medvednikov
0db0c642c3
vfmt: add missing imports automatically
2020-04-12 17:45:04 +02: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
Alexander Medvednikov
053de0b8e3
checker: check variable mutability
2020-04-11 04:09:41 +02:00
Alexander Medvednikov
8fbae86bb3
vfmt: skip skipped modules; add module test
2020-04-10 22:32:52 +02:00
Alexander Medvednikov
b95a47b5a7
checker: check fn main(); vfmt: fix for{}, module and module comments
2020-04-10 22:27:54 +02:00
Daniel Däschle
42b3b19af4
checker: fix checker enum infix error
2020-04-10 15:44:01 +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
320fad49c5
checker: check enum
2020-04-09 19:23:49 +02:00
Alexander Medvednikov
2b685fc80a
table: bring back parse_cflag()
2020-04-09 15:59:22 +02:00
Alexander Medvednikov
f508955b64
vfmt: fix mod.Type; run vfmt on ast.v
2020-04-09 15:33:46 +02:00
ka-weihe
71190c27a9
fmt: align consts
2020-04-09 01:10:08 +02:00
Alexander Medvednikov
3521b7ff89
websocket: fmt example + minor fixes
2020-04-08 21:21:58 +02:00
Alexander Medvednikov
fa6aaad6df
checker: handle `x := x`
2020-04-08 19:15:19 +02:00
hazohelet
78fc9bd12b
fmt: short_module for enum values
2020-04-08 18:55:50 +02:00
Alexander Medvednikov
80888b9518
tests: fix fmt test
2020-04-08 14:25:08 +02:00
Alexander Medvednikov
5ef5712e91
vfmt: do not generate a space if the comment is empty
2020-04-08 14:19:13 +02:00
Alexander Medvednikov
cdcb8b6c06
fmt: ` ` fix
2020-04-08 01:04:08 +02:00
Alexander Medvednikov
d54150cd22
vfmt: fix struct init indent and wrapped lines
2020-04-08 00:59:28 +02:00
Alexander Medvednikov
6bbd1943dd
cgen: fix &string cast; vfmt fixes
2020-04-07 18:51:44 +02:00
Alexander Medvednikov
275b20a184
vfmt: handle for ;; loops; run vfmt on parser.v
2020-04-07 15:48:13 +02:00
Alexander Medvednikov
8f9a8e1e7f
vfmt: small fixes + run on checker.v and fmt.v
2020-04-07 15:15:49 +02:00
Alexander Medvednikov
fd75cce0f3
vfmt: minor fixes + tests
2020-04-07 04:05:59 +02:00
Alexander Medvednikov
8d150d427a
merge and simplify cmd/v and v.builder
2020-04-07 00:44:31 +02:00
Alexander Medvednikov
852ec61b34
vfmt: fix single line if
2020-04-05 23:00:21 +02:00
Alexander Medvednikov
ffe8452f02
vfmt: fix imports
2020-04-05 21:53:00 +02:00
Alexander Medvednikov
08bbc251ff
vfmt: fix multiline comments
2020-04-05 19:35:10 +02:00
Alexander Medvednikov
8260236331
vfmt: run on fmt.v
2020-04-05 18:15:50 +02:00
Alexander Medvednikov
e464c4acc5
vfmt: more fixes + run on cgen.v
2020-04-05 18:03:36 +02:00
Alexander Medvednikov
df45932c03
vfmt: fix same line stmt comments
2020-04-05 16:38:33 +02:00
Alexander Medvednikov
de701ccfac
fmt: struct field comments on the same line
2020-04-05 12:25:39 +02:00
Alexander Medvednikov
2a06263a5b
vfmt: more fixes; enable `v fmt` and `v fmt -w`
2020-04-05 03:37:38 +02:00
Alexander Medvednikov
97db4c0e9a
vfmt: comments and other fixes
2020-04-05 02:08:13 +02:00
Alexey
6455e57e82
fmt: process C function declarations correctly
2020-04-04 15:36:46 +02:00
joe-conigliaro
bf59828897
ast: const impl & global scope & objects
2020-04-04 14:14:40 +11:00
Alexey
4cde6c0865
fmt: process TypeOf node
2020-04-03 11:59:53 +02:00
Alexander Medvednikov
30f306dc1a
another vfmt2 fix
2020-04-01 18:25:05 +02:00
Alexander Medvednikov
f657c4b514
another vfmt2 fix
2020-04-01 18:16:56 +02:00
Alexander Medvednikov
3ef6436bef
fix fmt2 test
2020-04-01 17:52:50 +02:00
joe-conigliaro
3440d7edd8
ast: first step merging CallExpr & MethodCallExpr
2020-03-30 21:39:20 +11:00
Alexey
a333ac1888
all: remove redundant parentheses in `if` statements
2020-03-29 10:08:42 +02:00
Alexander Medvednikov
7369cb7b86
fmt: fix tests
2020-03-27 15:19:13 +01:00
Delyan Angelov
2a7bc63919
vmft2: support for multiline comments, CompIf, AssertStmt, octal literals
2020-03-24 22:18:58 +01:00
Alexander Medvednikov
ab3f6d9202
cgen: generate indents for more readable C code
2020-03-22 10:12:45 +01:00
Alexey
9c668072b9
fmt: fix ForInStmt
2020-03-20 20:19:43 +01:00
Joe Conigliaro
15d4b5fcdb
checker/fmt/cgen: fun vfmt on changes from previous commit
2020-03-21 00:46:00 +11:00
Joe Conigliaro
a331abf675
ast/cgen/parser: combine IfExpr branches into single node
2020-03-21 00:39:56 +11:00
yuyi
010f3efcf0
os: filename => file_name
2020-03-19 15:49:07 +01:00
Delyan Angelov
f73b38a0d8
vfmt2: fix literal integer number formatting
2020-03-17 02:49:15 +01:00
Joe Conigliaro
cc338df77f
parser/checker/gen: update call args to use ast.CallArg
2020-03-14 21:11:43 +11:00
yuyi
57b1b12ab6
os: tmpdir => temp_dir
2020-03-10 15:02:09 +01:00
Joe Conigliaro
c9d30f78b7
v: no optional for scope.innermost & more blank_ident
2020-03-10 23:35:25 +11:00
Joe Conigliaro
f7a93a69f6
v: fix/gen multi return/assign + merge VarDecl & AssignStmt
2020-03-10 22:01:37 +11:00
yuyi
876b73f92c
os: join => join_path
2020-03-09 02:23:34 +01:00
Alexey
83b6292105
fmt: split tests
2020-03-08 15:57:16 +01:00
Delyan Angelov
5f08253f36
vfmt: add support for _keep.vv files, that v fmt should keep without changes
2020-03-08 15:46:04 +01:00
Delyan Angelov
2bed0d1bb5
fmt: extract array_slices_input.vv from simple_input.vv
2020-03-08 15:42:38 +01:00
yuyi
783dee1f48
os: merge with filepath
2020-03-07 22:26:26 +01:00
Delyan Angelov
5e541e1f11
vfmt: alias type and sum type + sum type fix
2020-03-07 17:37:55 +01:00
Alexey
e26907f079
fmt: fix errors in test files
2020-03-07 06:04:33 +01:00
Alexey
81ce524705
ast: add Expr to AsCast
2020-03-06 22:12:15 +01:00
Joe Conigliaro
7daf8f8fd0
v2: simplify MatchExpr in vfmt
2020-03-04 22:39:18 +11:00
Joe Conigliaro
5872961124
v2: update MatchExpr in vfmt
2020-03-04 22:14:37 +11:00
Alexey
78c885d657
fmt: add support for goto
2020-03-02 17:41:32 +01:00
Alexey
8fafaf38a3
fmt: add function with variadic arg to test file
2020-03-02 17:10:06 +01:00
Alexey
cca5c5537f
fmt: extract common code to methods
2020-03-02 17:09:45 +01:00
Alexey
c1e095e587
fmt: process `MatchExpr`
2020-02-29 20:43:15 +01:00
Alexander Medvednikov
27ce38937c
checker: fix Assoc
2020-02-29 18:07:29 +01:00
Alexander Medvednikov
d5faf36aa9
fmt: comments
2020-02-29 17:51:38 +01:00
Alexey
5a5f4ce99a
fmt: simplify `IndexExpr` processing
2020-02-29 17:45:08 +01:00
Alexey
ee0a0afb25
v2: process `or` block for `CallExpr`
2020-02-29 15:03:32 +01:00
Alexey
efff66ada7
fmt: add `pub` modifier for public enums
2020-02-29 14:38:23 +01:00
Alexander Medvednikov
6855c746bb
vfmt: EnumDecl
2020-02-28 17:21:24 +01:00
Alexander Medvednikov
ccf4f61521
ast: ParExpr, OrExpr, IfGuardExpr; ForInStmt fix; remove all cap vars
2020-02-28 15:36:41 +01:00
Alexander Medvednikov
6a198df3af
v2: ParExpr; mut var decl
2020-02-28 14:41:19 +01:00
Alexander Medvednikov
87205367d1
v2: minor fixes
2020-02-27 21:51:40 +01:00
Alexander Medvednikov
d619944cf5
vfmt: []xxx; mut args
2020-02-27 21:00:33 +01:00
Alexander Medvednikov
4f0d505c65
v2: `if x := `; fix `for key, val in`; CastExpr
2020-02-27 18:02:40 +01:00
Alexey
ca9fa6407f
v2: distinguish public and private constants
2020-02-26 22:43:37 +01:00
Alexey
70f085be18
v2: process unsafe statements
2020-02-26 20:45:03 +01:00
Alexey
b1ea908b3b
fmt: process `defer` statement
2020-02-26 20:44:42 +01:00
Alexander Medvednikov
0f8b2399ee
fmt: fix new EnumVal
2020-02-25 19:59:47 +01:00
Alexey
5918946feb
fmt: process attributes
2020-02-24 17:18:14 +01:00
Alexey
87ad5a96b9
v2: stringify multi-return types
2020-02-24 16:38:31 +01:00
Alexey
2bbb8526a3
fmt: process RangeExpr properly
2020-02-24 16:37:20 +01:00
Alexey
26fa833984
fmt: process assignment statement correctly
2020-02-23 11:22:07 +01:00
Alexander Medvednikov
2eb4f663d6
fix fmt test
2020-02-22 17:14:38 +01:00
Alexander Medvednikov
dd29bfe4d2
fix fmt test
2020-02-22 17:07:03 +01:00
Alexander Medvednikov
d510cd1e0d
fmt: else, for in
2020-02-22 16:59:50 +01:00
Alexander Medvednikov
5fef8390a1
fmt: assoc
2020-02-22 14:39:25 +01:00
Alexander Medvednikov
cd41967aa1
fmt: struct pub/mut fields, map init
2020-02-22 14:13:22 +01:00