1module Language.JSON.String.Tokens
3import Data.String.Extra
9data JSONStringTokenKind
16JSONStringToken = Token JSONStringTokenKind
18Eq JSONStringTokenKind where
19 (==) JSTQuote JSTQuote = True
20 (==) JSTChar JSTChar = True
21 (==) JSTSimpleEscape JSTSimpleEscape = True
22 (==) JSTUnicodeEscape JSTUnicodeEscape = True
26charValue : String -> Char
27charValue x = case index 0 x of
32simpleEscapeValue : String -> Char
48unicodeEscapeValue : String -> Char
49unicodeEscapeValue x = chr $ cast ("0x" ++ drop 2 x)
51TokenKind JSONStringTokenKind where
53 TokType JSTChar = Char
54 TokType JSTSimpleEscape = Char
55 TokType JSTUnicodeEscape = Char
57 tokValue JSTQuote = const ()
58 tokValue JSTChar = charValue
59 tokValue JSTSimpleEscape = simpleEscapeValue
60 tokValue JSTUnicodeEscape = unicodeEscapeValue
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list