Fix parsing of single quoted keys (#201)

Patch #193 doesn't work correctly because that must be handled by the
lexer, and `parseKey()` must not handle escape sequences.

Ref #61
This commit is contained in:
Kazuyoshi Kato
2017-10-26 23:26:39 -07:00
committed by Thomas Pelletier
parent 9bf0212445
commit 4874e8477b
7 changed files with 77 additions and 112 deletions
+1 -4
View File
@@ -185,10 +185,7 @@ func (p *tomlParser) parseAssign() tomlParserStateFn {
}
// assign value to the found table
keyVals, err := parseKey(key.val)
if err != nil {
p.raiseError(key, "%s", err)
}
keyVals := []string{key.val}
if len(keyVals) != 1 {
p.raiseError(key, "Invalid key")
}