Nick Treleaven
|
eb47ce1e83
|
ast: fix ParExpr.str(), RangeExpr.str(), SizeOf.str() (#6023)
|
2020-07-31 02:31:01 +02:00 |
Delyan Angelov
|
3883c34b8c
|
vfmt: fix eating of `n` in `string(x,n)`
|
2020-07-30 12:15:04 +03:00 |
Alexander Medvednikov
|
f269cbdc94
|
Revert "parser: Support `unsafe(expr)` (#5973)"
This reverts commit 19c226fcf8 .
|
2020-07-29 21:41:47 +02:00 |
Nick Treleaven
|
19c226fcf8
|
parser: Support `unsafe(expr)` (#5973)
|
2020-07-28 11:20:52 +03:00 |
Enzo
|
d7ed3cd8b7
|
fmt: fix SQL formatting in ORM expressions - remove trailing spaces (#5996)
|
2020-07-28 11:09:42 +03:00 |
Enzo
|
2de1437a1e
|
ci: vet all files from the compiler (#5994)
|
2020-07-27 12:15:29 +02:00 |
Louis Schmieder
|
b58b15993c
|
gen: compile time for (methods and fields) (#5957)
|
2020-07-25 00:02:44 +02:00 |
Delyan Angelov
|
d31142ac3e
|
vfmt: fix compilation after the more strict mutability check
|
2020-07-24 08:43:18 +03:00 |
Uwe Krüger
|
6586a9a657
|
fmt: give braced sub expressions a higher priority (#5941)
|
2020-07-23 00:32:34 +02:00 |
Delyan Angelov
|
37c6f6ab1b
|
vfmt: fix compilation with -prod
|
2020-07-22 21:43:20 +03:00 |
joe-conigliaro
|
d46a89b90d
|
parser/checker/fmt: optimize scope lookups by storing object with ident & add if expr smartcast support to vfmt (#5935)
|
2020-07-23 02:10:31 +10:00 |
Delyan Angelov
|
4cb9e651a6
|
vfmt: fix `sizeof(C.Type)`
|
2020-07-21 16:28:30 +03:00 |
Delyan Angelov
|
e1eb9c4ff1
|
vfmt: fix `x := *&int(ptr)`
|
2020-07-21 15:58:17 +03:00 |
Delyan Angelov
|
35df792c05
|
vfmt: fix `#include "@VROOT/path/x.h"`
|
2020-07-21 14:26:49 +03:00 |
Enzo
|
8653605b0a
|
fmt: allow for comments in call args and if expressions branches (#5871)
|
2020-07-20 17:48:33 +03:00 |
Enzo
|
8a855ccae1
|
fmt,vet: handle `var in [single_value]` (#5882)
|
2020-07-19 19:58:34 +02:00 |
Ryan Willis
|
1114fd28d0
|
all: import individual symbols feature (#5872)
|
2020-07-18 21:34:38 +02:00 |
Enzo
|
90d9040e6e
|
all: make comment expressions + fix vfmt array init (#5851)
|
2020-07-17 19:13:22 +02:00 |
Enzo
|
d301611de7
|
fmt: interface decl fixes (#5829)
|
2020-07-14 18:52:28 +02:00 |
Delyan Angelov
|
5ad957f270
|
vfmt: fix formatting for `x, _ := f()`
|
2020-07-14 19:11:16 +03:00 |
Nick Treleaven
|
53023c1ca9
|
all: add UnsafeExpr (#5793)
|
2020-07-12 12:58:33 +02:00 |
Delyan Angelov
|
26768e8514
|
vfmt: strip `current_module.` in fn args more robustly
|
2020-07-11 16:09:20 +03:00 |
Delyan Angelov
|
b55f84c0a8
|
vfmt: turn off module is imported but never used for vfmt
|
2020-07-11 15:03:37 +03:00 |
Delyan Angelov
|
7c0a298701
|
vfmt: fix crash when a .v file contains only imports
|
2020-07-11 14:54:55 +03:00 |
Delyan Angelov
|
006d260d20
|
vfmt: keep `vproto.Name`, in module `proto` in struct inits too
|
2020-07-11 02:42:57 +03:00 |
Delyan Angelov
|
7248d8422e
|
vfmt: keep `vproto.Name`, when current module is `proto`
|
2020-07-11 00:59:19 +03:00 |
Uwe Krüger
|
581603f2bd
|
fmt: make formatter know about new keywords `shared`, `rlock` (#5779)
|
2020-07-09 22:41:45 +02:00 |
Uwe Krüger
|
194ecda829
|
fmt: array_init: use line breaks of first elements in every hierarchy (#5777)
|
2020-07-09 22:36:49 +02:00 |
Uwe Krüger
|
e47ad33af6
|
fmt: format array elements line-by-line when nl after `[` (#5776)
|
2020-07-09 19:47:12 +02:00 |
Daniel Däschle
|
c5dc1a33b6
|
all: remove `it` smartcast and replace with original variable name (#5764)
|
2020-07-09 17:14:14 +02:00 |
Daniel Däschle
|
5ea17ad2d4
|
all: if smartcast part 2 (#5754)
|
2020-07-08 15:46:58 +02:00 |
joe-conigliaro
|
5fd5e558ae
|
parser/checker/gen: anon fn direct call with args
|
2020-07-08 01:10:39 +10:00 |
spaceface777
|
d0e321c8a3
|
fmt: allow parsing files without `fn main()` (#5681)
|
2020-07-05 20:53:01 +02:00 |
Alexander Medvednikov
|
188bad4f38
|
vfmt: handle string attrs
|
2020-07-04 23:38:28 +02:00 |
Delyan Angelov
|
b018381f10
|
vfmt: fix `as var` in `match expr as var {}`
|
2020-07-04 16:46:46 +03:00 |
Delyan Angelov
|
fe50bdc164
|
vfmt: ran `v vet vlib/v/` and fix spaces
|
2020-07-04 16:19:54 +03:00 |
Delyan Angelov
|
5b93b4f37d
|
vfmt: allow multiple comments after if branches
|
2020-07-04 16:13:58 +03:00 |
Delyan Angelov
|
35431d457b
|
checker: add check for strict .str() method signature
|
2020-07-04 14:14:43 +03:00 |
Delyan Angelov
|
4403c76406
|
vfmt: print `or { }` on a single line
|
2020-07-04 14:14:43 +03:00 |
Uwe Krüger
|
3b067f5f85
|
all: experimental locked concurrency support, part 1 (#5637)
|
2020-07-04 12:44:25 +02:00 |
Delyan Angelov
|
df2749dd50
|
vfmt: fix indent level of commented match branches
|
2020-07-03 17:16:20 +03:00 |
Alexander Medvednikov
|
b7175b54eb
|
vweb: ['/:arg1/:arg2/action'] attribute
|
2020-07-03 15:10:39 +02:00 |
Delyan Angelov
|
5b900056f3
|
vfmt: add _keep.vv tests for the recent fixes, to prevent regressions
|
2020-07-02 17:50:21 +03:00 |
Delyan Angelov
|
d809bbb715
|
vfmt: fix enum field comments
|
2020-07-02 17:39:56 +03:00 |
Delyan Angelov
|
132170f54c
|
vfmt: handle comments in enum Abc{} and after match branches
|
2020-07-02 16:51:09 +03:00 |
Delyan Angelov
|
05e11f6336
|
vfmt: fix `for x; y; i++ \n {}`
|
2020-07-02 15:30:06 +03:00 |
Delyan Angelov
|
37d51e8d74
|
vfmt: keep top level comments on their own lines
|
2020-07-02 15:21:09 +03:00 |
Delyan Angelov
|
29943d7a91
|
vfmt: fix eating C. from C.sapp_desc{} and adding & to &&&App()
|
2020-07-02 15:06:35 +03:00 |
Alexander Medvednikov
|
2716a37916
|
ci: fix v vet call; fmt: fix SizeOf
|
2020-07-01 20:07:33 +02:00 |
Alexander Medvednikov
|
dbcb23ddc8
|
ci: run v vet on cgen and ast
|
2020-07-01 19:07:19 +02:00 |
Alexander Medvednikov
|
da99868a28
|
ci: run v vet vlib/v/parser
|
2020-07-01 18:57:14 +02:00 |
Delyan Angelov
|
78e1127d99
|
cgen: treat the main module like any other v module
|
2020-07-01 00:53:53 +02:00 |
Delyan Angelov
|
0661273aad
|
vfmt: add support for sql x {} expressions and statements
|
2020-06-28 13:36:21 +03:00 |
Uwe Krüger
|
46379d92f4
|
fmt: force break in front of long unbreakable parts, avoid very small sub-expressions
|
2020-06-25 22:24:28 +02:00 |
Uwe Krüger
|
bdecbc1945
|
fmt: use `-1` for *really* no precedence, since `&` and `|` have precedence 0
|
2020-06-25 02:39:33 +02:00 |
Uwe Krüger
|
eb68c222fe
|
fmt: fix weird bug with tabs in string inpertolation
|
2020-06-24 20:40:29 +02:00 |
Uwe Krüger
|
0018e44102
|
fmt: further improvements by taking precedence into account for subexpressions
|
2020-06-24 15:19:30 +02:00 |
Alexander Medvednikov
|
11871d9544
|
fmt: re-run on parser.v and fmt.v
|
2020-06-24 14:35:00 +02:00 |
Daniel Däschle
|
852fca2151
|
all: call anon fns right away
|
2020-06-24 12:54:39 +02:00 |
Uwe Krüger
|
56749877ea
|
fmt: fix handling of double quotes inside single quotes
|
2020-06-23 23:59:58 +02:00 |
ka-weihe
|
4e447db883
|
parser/fmt: fix comments in structs/consts
|
2020-06-23 18:01:56 +02:00 |
Uwe Krüger
|
000eaca6be
|
fmt: avoid breaking lines with <= 100 characters
|
2020-06-23 17:54:39 +02:00 |
Alexander Medvednikov
|
e65879d076
|
fmt: fix compilation
|
2020-06-21 23:23:31 +02:00 |
Uwe Krüger
|
0338d4153a
|
fmt: make linebreak smarter by algorithm based on penalty
|
2020-06-19 19:54:26 +02:00 |
Alexander Medvednikov
|
cd8392e42d
|
orm: insert
|
2020-06-19 16:43:35 +02:00 |
Alexander Medvednikov
|
d04554f0b7
|
all: more match updates
|
2020-06-19 11:46:08 +02:00 |
Ned Palacios
|
5ff7d07138
|
vdoc: fix sorting + other minor improvements
|
2020-06-19 10:36:45 +02:00 |
spaceface777
|
68967e833d
|
parser: skip comp_if when building for a different compiler
|
2020-06-18 22:01:00 +02:00 |
Alexander Medvednikov
|
d4b17fb0c3
|
fmt: use the new match syntax
|
2020-06-18 20:07:48 +02:00 |
Uwe Krüger
|
3b6e66db0d
|
fmt: further fixes for string interpolation and builtin macros
|
2020-06-18 18:48:23 +02:00 |
Uwe Krüger
|
9c9f6415da
|
fmt: more sophisticated analysis for string interpolat
|
2020-06-17 19:49:13 +02:00 |
joe-conigliaro
|
d478b44915
|
parser/checker/gen: merge AssignExpr & AssignStmt into just AssignStmt
|
2020-06-16 21:20:16 +10:00 |
Alexander Medvednikov
|
9d6b402df0
|
test: fix sqlite_test.v
|
2020-06-16 12:23:52 +02:00 |
yuyi
|
2daf915371
|
parser: `expression evaluated but not used` error
|
2020-06-16 11:06:53 +02:00 |
Uwe Krüger
|
f2d9fa3815
|
cgen: restructure string_inter_literal()
|
2020-06-16 10:41:51 +02:00 |
Delyan Angelov
|
62a872b8b5
|
vdoc: fix `v doc sokol` const formatting
|
2020-06-15 18:28:00 +03:00 |
Adam Stankiewicz
|
b3fc462a78
|
scanner: fix parsing multiple .amp
|
2020-06-13 00:01:44 +02:00 |
Alexander Medvednikov
|
72fdb09e46
|
time: relative_short(); fmt: handle $vweb.html()
|
2020-06-11 20:26:49 +02:00 |
Delyan Angelov
|
a43b8b5c96
|
vfmt: add maps_in_fn_args__keep.vv test for 3a369f5
|
2020-06-10 17:15:53 +03:00 |
Delyan Angelov
|
4fc41c4bc4
|
v: add compiler support for _unlikely_(x) too
|
2020-06-09 18:11:03 +03:00 |
Delyan Angelov
|
c7d4360931
|
v: add full compiler support for _likely_(x)
|
2020-06-09 17:42:43 +03:00 |
Alexander Medvednikov
|
fb6be080fb
|
fmt: fix compilation
|
2020-06-06 16:52:41 +02:00 |
Alexander Medvednikov
|
2770077cb0
|
fmt: x.foo!() experiment
|
2020-06-06 16:05:24 +02:00 |
Alexander Medvednikov
|
40bd1be85f
|
parser: fix !
|
2020-06-06 12:43:35 +02:00 |
yuyi
|
5ae8853648
|
all: change `f mut Foo` to `mut f Foo`
|
2020-06-04 10:35:40 +02:00 |
yuyi
|
962bbf1c60
|
fmt: fix ?void format error, add _keep.vv test
|
2020-06-03 18:45:40 +03:00 |
Ned Palacios
|
9fcb8536e8
|
fmt: fix struct decl gen with c structs
|
2020-06-02 07:41:02 +02:00 |
Delyan Angelov
|
ae8f7cf569
|
tests: fix some tests, that failed due to the stricter immutable checks
|
2020-06-01 18:24:38 +03:00 |
Delyan Angelov
|
bb9d268bd9
|
fmt: add struct init keep test, fix another &&Foo bug
|
2020-05-30 22:34:57 +03:00 |
Delyan Angelov
|
077e06b44e
|
fmt: fix struct field default expressions and tags
|
2020-05-29 21:22:27 +03:00 |
Ned Palacios
|
94f23d96e9
|
vfmt: fix generation on C idents, fixed arrays
|
2020-05-28 08:06:20 +02:00 |
Alexander Medvednikov
|
d6037cbcf2
|
generics: fix method calls
|
2020-05-28 05:58:19 +02:00 |
div72
|
cecb7d29c7
|
Prevent vfmt from appending the module name to FnTypeDecl inside the same module (#5080)
|
2020-05-28 02:19:24 +03:00 |
Ned Palacios
|
e0db880791
|
fmt: simplify map_init
|
2020-05-27 16:26:45 +03:00 |
Alexander Medvednikov
|
7c9279c447
|
vfmt: make work with comptime
|
2020-05-27 03:33:40 +02:00 |
Ned Palacios
|
b02ec8cbf9
|
vfmt: fix raw string support
|
2020-05-27 03:10:47 +02:00 |
Alexander Medvednikov
|
1ef8eacd6e
|
checker/gen: more generics fixes; ComptimeCall
|
2020-05-25 05:32:36 +02:00 |
Alexander Medvednikov
|
67750c91d7
|
generics: lots of fixes
|
2020-05-24 04:43:03 +02:00 |
Delyan Angelov
|
43eaec325d
|
fmt: add keep tests for struct init, fix warnings
|
2020-05-23 12:05:21 +03:00 |
Delyan Angelov
|
c690c2f984
|
vfmt: fix formatting of struct init without a module prefix
|
2020-05-23 11:56:06 +03:00 |
Enzo Baldisserri
|
801bca1ef2
|
compiler: propagate optional
|
2020-05-23 08:51:15 +02:00 |
Delyan Angelov
|
4af4a8f2ff
|
fmt: fix 'import time as t', then using t.sleep_ms() .
|
2020-05-22 22:31:24 +03:00 |
Alexander Medvednikov
|
227f039652
|
vfmt: handle generic fn calls
|
2020-05-21 18:36:25 +02:00 |
Alexander Medvednikov
|
82cedbaf62
|
fmt: fix `map[string][]string`; parser: allow `foo<int>(10)`
|
2020-05-20 21:40:24 +02:00 |
spaceface777
|
b10df252dc
|
all: replace `is_c`, `is_js` with `language`
|
2020-05-19 17:12:47 +02:00 |
Ned Palacios
|
bd85d2fd2a
|
vfmt: make methods and structs public, to be used in vdoc
|
2020-05-19 14:19:37 +03:00 |
Alexander Medvednikov
|
57ea9bec30
|
tests: vfmt test for all vlib/v files
|
2020-05-18 18:43:07 +02:00 |
Alexander Medvednikov
|
b1bf5f0edc
|
vfmt: wrap long sum type definitions
|
2020-05-18 18:08:32 +02:00 |
Alexander Medvednikov
|
90270d8791
|
vfmt: handle fixed size arrays
|
2020-05-18 16:52:12 +02:00 |
Ned Palacios
|
d94d436273
|
table, vfmt: fix typ_to_string + some fixes to vfmt
|
2020-05-18 15:37:06 +02:00 |
Alexander Medvednikov
|
1bf26a35fa
|
array: rename default to init
|
2020-05-13 22:00:24 +02:00 |
Alexander Medvednikov
|
33a9822548
|
parser/vfmt: handle array len and default in array init
|
2020-05-13 16:11:52 +02:00 |
Alexander Medvednikov
|
1c8e14c77c
|
vfmt: handle comments in const blocks
|
2020-05-12 00:09:59 +02:00 |
Alexander Medvednikov
|
c64f8b0d1f
|
parser/checker: pub: struct fields
|
2020-05-09 15:16:48 +02:00 |
Alexander Medvednikov
|
f80876497e
|
fmt: use the new `mut` syntax in args
|
2020-05-06 12:43:46 +02:00 |
Alexander Medvednikov
|
c5d295c378
|
fmt: move struct init logic to a separate fn
|
2020-05-05 15:06:51 +02:00 |
Delyan Angelov
|
d30eefc3be
|
fmt: improve handling of map[k]v and []map[k]v types
|
2020-05-04 18:27:07 +03:00 |
Delyan Angelov
|
5eb71c4a13
|
fmt: initial support for -debug
|
2020-05-04 17:27:41 +03:00 |
Delyan Angelov
|
35f56bc4f0
|
vfmt: fix eating ? in `$if x ? {}`, missing newline in `__global ...`
|
2020-05-01 12:29:23 +03:00 |
Enzo Baldisserri
|
50491670af
|
fmt: fix formatting backtick char literal
|
2020-04-30 09:33:43 +02:00 |
Alexander Medvednikov
|
2fc05b814c
|
all: interface arrays
|
2020-04-29 12:21:15 +02:00 |
Delyan Angelov
|
0e765e34be
|
vfmt: extract v.util.find_working_diff_command, color_compare_files
|
2020-04-29 11:51:45 +03:00 |
Delyan Angelov
|
8ea087f957
|
vfmt: fix compilation; handle the case when fmt.tabs is not enough
|
2020-04-28 16:04:37 +03:00 |
Alexander Medvednikov
|
7955181c6c
|
tests: [] fixes
|
2020-04-26 09:18:29 +02:00 |
Alexander Medvednikov
|
3ab8dc0092
|
parser: array init: `[]string` => `[]string{}`
|
2020-04-26 09:17:17 +02:00 |
Alexander Medvednikov
|
f7153ca4fa
|
fmt: array_init(); parser: fn_redefinition_error()
|
2020-04-26 07:17:01 +02:00 |
yuyi
|
541b058e90
|
all: use `a !in b` instead of `!(a in b)`
|
2020-04-26 06:39:23 +02:00 |
Enzo Baldisserri
|
c73d91a8fe
|
fmt: TypeDecl; format more files
|
2020-04-25 20:58:00 +02:00 |
Enzo Baldisserri
|
fb54a2635c
|
fmt: lots of fixes
|
2020-04-25 17:49:16 +02:00 |
Alexander Medvednikov
|
d7ee4755c2
|
parser/cgen: interfaces (part 1)
|
2020-04-22 20:23:53 +02:00 |
Kris Cherven
|
faed178cb1
|
fmt: fix optional formatting
|
2020-04-22 20:12:58 +02:00 |
Alexander Medvednikov
|
ee2e83fef0
|
go back to `mut`. decisions, decisions...
|
2020-04-21 05:11:50 +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
|
de9f302412
|
fmt: array newlines test
|
2020-04-18 23:58:59 +02:00 |
Alexander Medvednikov
|
a18201faa7
|
fmt: save newlines between array elements
|
2020-04-18 23:09:23 +02:00 |
Alexander Medvednikov
|
515da900e4
|
fmt: remove \t before same line comments
|
2020-04-17 20:53:39 +02:00 |
Alexander Medvednikov
|
2c778c8849
|
fmt: single line matches
|
2020-04-17 20:51:19 +02:00 |
Daniel Däschle
|
402e55d115
|
ast: expr.Position; struct field refactoring
|
2020-04-17 02:38:39 +02:00 |
Kris Cherven
|
182108faca
|
fmt fmt.v, vfmt.v
|
2020-04-16 15:54:17 +02:00 |
Kris Cherven
|
332d52f459
|
fmt: stop mangling reference names
|
2020-04-16 07:28:41 +02:00 |
Abdullah Atta
|
6a186e8f11
|
jsgen: implement js backend
|
2020-04-15 23:16:49 +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 |
Alexander Medvednikov
|
f34352faf9
|
fmt: use var instead of mut
|
2020-04-15 01:55:51 +02:00 |
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 |