Add comment to justify this madness

This commit is contained in:
Thomas Pelletier
2015-09-09 17:04:36 +01:00
parent 821a80e635
commit d467309bdd
+4
View File
@@ -312,6 +312,10 @@ func (p *tomlParser) parseArray() interface{} {
}
if follow.typ == tokenRightBracket {
p.getToken()
// An array of TomlTrees is actually an array of inline
// tables, which is a shorthand for a table array. If the
// array was not converted from []interface{} to []*TomlTree,
// the two notations would not be equivalent.
if arrayType == reflect.TypeOf(newTomlTree()) {
tomlArray := make([]*TomlTree, len(array))
for i, v := range array {