on master help sign in
finish mapDecl parser
commitcf3d3c4b3ace622b18399f6c0aa297240990782f authorCorey O'Connor <coreyoconnor@gmail.com> dateTue 3 Jun 2014, 23:14 (12 years ago) parent46e93af
1 file changed+2−2
src/Graphics/Vty/Config.hs+2−2
src/Graphics/Vty/Config.hs+2−2
@@ -168,11 +168,11 @@ configLexer = P.makeTokenParser configLanguage
168168mapDecl = do
169169 void $ string "map"
170170 P.whiteSpace configLexer
171− termIdent <- (char "_" >> return Nothing) <|>
171+ termIdent <- (char "_" >> return Nothing) <|> (Just <$> P.stringLiteral configLexer)
172172 bytes <- P.stringLiteral configLexer
173173 key <- parseKey
174174 modifiers <- parseModifiers
175− lift $ tell $ def { inputOverrides = [(bytes, EvKey key modifiers)] }
175+ lift $ tell $ def { inputOverrides = [(termIdent, bytes, EvKey key modifiers)] }
176176
177177-- TODO: Generated by a vim macro. There is a better way here. Derive parser? Use Read
178178-- instance?