Compare commits
1 Commits
6e4cbfdb6d
...
56efc109d7
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 56efc109d7 |
|
@ -231,12 +231,9 @@ class JavaScriptHighlighter {
|
|||
}
|
||||
|
||||
private func consumeObjectKey() {
|
||||
guard let char = peek() else { return }
|
||||
let keyStart = currentIndex!
|
||||
if identifierStarts.contains(char) {
|
||||
consumeIdentifier()
|
||||
} else if char == "'" || char == "\"" {
|
||||
consumeString()
|
||||
while let char = peek(), identifiers.contains(char) {
|
||||
consume()
|
||||
}
|
||||
print("Object key: '\(text[keyStart..<currentIndex])'")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue