builtin: vfmt every .v file, except vlib/builtin/int_test.v (#9448)

This commit is contained in:
zakuro 2021-03-25 03:39:59 +09:00 committed by GitHub
parent 5d8b9b0151
commit 6bc9ef7373
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 259 additions and 272 deletions

View file

@ -15,7 +15,7 @@ pub fn println(s any) {
pub fn print(s any) {
// TODO
// $if js.node {
JS.process.stdout.write(s.toString())
JS.process.stdout.write(s.toString())
// } $else {
// panic('Cannot `print` in a browser, use `println` instead')
// }
@ -28,7 +28,7 @@ pub fn eprintln(s any) {
pub fn eprint(s any) {
// TODO
// $if js.node {
JS.process.stderr.write(s.toString())
JS.process.stderr.write(s.toString())
// } $else {
// panic('Cannot `eprint` in a browser, use `eprintln` instead')
// }
@ -68,13 +68,13 @@ pub:
}
pub fn (o Option) str() string {
if o.state == 0 {
return 'Option{ ok }'
}
if o.state == 1 {
return 'Option{ none }'
}
return 'Option{ error: "${o.err}" }'
if o.state == 0 {
return 'Option{ ok }'
}
if o.state == 1 {
return 'Option{ none }'
}
return 'Option{ error: "$o.err" }'
}
pub fn error(s string) Option {
@ -94,5 +94,4 @@ pub fn error_with_code(s string, code int) Option {
code: code
}
}
}