1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

run vfmt on math and sha; add vfmt check to test-compiler

This commit is contained in:
Alexander Medvednikov
2019-12-22 02:22:32 +03:00
parent 9198285688
commit a251db068f
17 changed files with 721 additions and 659 deletions

View File

@@ -2513,7 +2513,7 @@ fn (p mut Parser) array_init() string {
const_name := p.prepend_mod(p.lit)
if p.table.known_const(const_name) {
c := p.table.find_const(const_name) or {
// p.error('unknown const `$p.lit`')
p.error('unknown const `$const_name`')
exit(1)
}
if c.typ == 'int' && p.peek() == .rsbr {
@@ -2582,8 +2582,9 @@ fn (p mut Parser) array_init() string {
}
if p.tok != .rsbr && p.tok != .semicolon {
p.gen(', ')
line_nr := p.tok
p.check(.comma)
p.fspace()
p.fspace_or_newline()
}
i++
// Repeat (a = [0;5] )