Modify a number of examples in vlang.io/docs to run correctly in Playground
tompao opened this issue · comments
Tom Paoletti commented
- 2 examples at https://vlang.io/docs#match
undefined: `number`
8| }
unexpected token: `enum`
1| fn main() {
- 1 example at https://vlang.io/docs#structs
unexpected token: `}`
11| println(p.x) // Struct fields are accessed using a dot
- 1 example at https://vlang.io/docs#methods
unexpected token: `struct`
1| fn main() {
- 1 example at https://vlang.io/docs#recvs
unexpected token: `struct`
1| fn main() {
- 2 examples at https://vlang.io/docs#consts
unexpected token: `}`
8| println(world)
unexpected token: `}`
21| println(blue)
- 1 example in https://vlang.io/docs#interfaces
unexpected token: `struct`
1| fn main() {
- 1 example in https://vlang.io/docs#enums
unexpected token: `}`
9| println(color) // "1" TODO: print "green"?
- 1 example in https://vlang.io/docs#json
undefined: `json`, use `import json`
14|
Tom Paoletti commented
@medvednikov Opened PR to take care of these. Thanks !