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