Files
wren/test/language/map/newlines.wren
T

28 lines
362 B
Plaintext
Raw Normal View History

2015-08-31 07:23:36 -07:00
// Allow after '{', ':', and ',', and before ']'.
var map = {
"a":
"a value",
"b": "b value"
}
2015-09-15 07:46:09 -07:00
System.print(map["a"]) // expect: a value
System.print(map["b"]) // expect: b value
2015-08-31 07:23:36 -07:00
// Newline after trailing comma.
map = {"c": "c value",
}
2015-09-15 07:46:09 -07:00
System.print(map["c"]) // expect: c value
2015-08-31 07:23:36 -07:00
// Newline in empty map.
map = {
}
2015-09-15 07:46:09 -07:00
System.print(map.count) // expect: 0