Drop support for \Uxxxx unicode literals since this isn't part of the spec.
diff --git a/lex.go b/lex.go index b33e3de..ad66717 100644 --- a/lex.go +++ b/lex.go
@@ -303,7 +303,7 @@ l.appendRune(decodeEscapedCharacter(r)) return nil - case isUnicodeLiteral(r): + case atUnicodeLiteral(r): return l.scanUnicodeLiteral() case isEOF(r): @@ -352,6 +352,12 @@ } } +// atUnicodeLiteral reports whether we are at a unicode literal. +// The escape character has already been consumed. +func atUnicodeLiteral(r rune) bool { + return r == 'u' +} + // isComment reports whether we are at the start of a comment. func isComment(r rune) bool { return r == '#' || r == '!' @@ -387,8 +393,4 @@ // isWhitespace reports whether the rune is a whitespace character. func isWhitespace(r rune) bool { return strings.ContainsRune(whitespace, r) -// isUnicodeLiteral reports whether we are at a unicode literal. -// The escape character has already been consumed. -func isUnicodeLiteral(r rune) bool { - return r == 'u' || r == 'U' }
diff --git a/properties_test.go b/properties_test.go index 613e0d2..08cfb1e 100644 --- a/properties_test.go +++ b/properties_test.go
@@ -62,7 +62,6 @@ func (l *LoadSuite) TestUnicodeLiteralInKey(c *C) { testKeyValue(c, "key\\u2318 = value", "key⌘", "value") - testKeyValue(c, "key\\U2318 = value", "key⌘", "value") } func (l *LoadSuite) TestEscapedCharsInValue(c *C) {