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 -1
View File
@@ -690,7 +690,7 @@ func TestKeyGroupArray(t *testing.T) {
func TestQuotedKey(t *testing.T) {
testFlow(t, "\"a b\" = 42", []token{
{Position{1, 1}, tokenKey, "\"a b\""},
{Position{1, 1}, tokenKey, "a b"},
{Position{1, 7}, tokenEqual, "="},
{Position{1, 9}, tokenInteger, "42"},
{Position{1, 11}, tokenEOF, ""},