Handle non-alpha chars in keys

This commit is contained in:
Thomas Pelletier
2013-12-10 19:46:56 +01:00
parent b1d602f733
commit 0c4e891f3e
2 changed files with 12 additions and 1 deletions
+9
View File
@@ -113,6 +113,15 @@ func TestBasicKeyAndEqual(t *testing.T) {
})
}
func TestKeyWithSharpAndEqual(t *testing.T) {
testFlow(t, "key#name = 5", []token{
token{tokenKey, "key#name"},
token{tokenEqual, "="},
token{tokenInteger, "5"},
token{tokenEOF, ""},
})
}
func TestKeyEqualStringEscape(t *testing.T) {
testFlow(t, "foo = \"hello\\\"\"", []token{
token{tokenKey, "foo"},