toml: disallow unclosed arrays (#12273)
parent
506924b01c
commit
8a4756819a
|
@ -509,8 +509,8 @@ pub fn (mut p Parser) array() ?[]ast.Value {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
.eof {
|
.eof {
|
||||||
// End Of File
|
return error(@MOD + '.' + @STRUCT + '.' + @FN +
|
||||||
return arr
|
' could not parse array. Reached EOF "$p.tok.kind" "$p.tok.lit" ("$p.tok.lit") in this (excerpt): "...${p.excerpt()}..."')
|
||||||
}
|
}
|
||||||
.hash {
|
.hash {
|
||||||
// TODO array.comments << p.comment()
|
// TODO array.comments << p.comment()
|
||||||
|
|
|
@ -33,10 +33,8 @@ const (
|
||||||
'table/duplicate-table-array.toml',
|
'table/duplicate-table-array.toml',
|
||||||
// Array
|
// Array
|
||||||
'array/tables-1.toml',
|
'array/tables-1.toml',
|
||||||
'array/no-close-2.toml',
|
|
||||||
'array/missing-separator.toml',
|
'array/missing-separator.toml',
|
||||||
'array/text-after-array-entries.toml',
|
'array/text-after-array-entries.toml',
|
||||||
'array/no-close.toml',
|
|
||||||
'array/text-before-array-separator.toml',
|
'array/text-before-array-separator.toml',
|
||||||
// Date / Time
|
// Date / Time
|
||||||
'datetime/impossible-date.toml',
|
'datetime/impossible-date.toml',
|
||||||
|
|
Loading…
Reference in New Issue