Parse pairs in table literal correctly.

This commit is contained in:
Cheer Xiao 2013-10-16 21:29:21 +08:00
parent bb1198614f
commit fa32cf73a0

View File

@ -331,8 +331,9 @@ func (t *Tree) table() (tn *TableNode) {
next := t.peekNonSpace()
if next.Typ == ItemBare && next.Val == "=" {
t.next()
// New element of dict part. Skip spaces and find value term.
t.nextNonSpace()
t.peekNonSpace()
valueTerm := t.term()
tn.appendToDict(term, valueTerm)
} else {