Fix error report of type mismatch on inline tables (#853)
Parser did not track the location of the faulty inline table in the document, and unmarshaler tried to the use the non-raw data field of the AST node, both resulting into a panic when generating the parser error. Fixes #850
This commit is contained in:
@@ -402,6 +402,7 @@ func (p *Parser) parseInlineTable(b []byte) (reference, []byte, error) {
|
||||
// inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ]
|
||||
parent := p.builder.Push(Node{
|
||||
Kind: InlineTable,
|
||||
Raw: p.Range(b[:1]),
|
||||
})
|
||||
|
||||
first := true
|
||||
|
||||
Reference in New Issue
Block a user