return font doesn't overwrite invalidAssignment stub now

This commit is contained in:
Armin Friedl 2016-08-28 21:14:27 +02:00
parent ea7d2dff2c
commit ff7506927b

View file

@ -70,9 +70,10 @@ fontMap = [ (attrName "assignment" , fg Vty.blue)
] ]
fontify :: CheckString -> Fontifications fontify :: CheckString -> Fontifications
fontify = concatApply [ assignments, invalidAccess fontify = concatApply [ assignments, strings
, strings, returns, guards , returns, guards, comments
, comments, mismatchedBrackets , invalidAccess
, mismatchedBrackets
, mismatchedQuotes] , mismatchedQuotes]
concatApply :: [Fontifier] -> CheckString -> Fontifications concatApply :: [Fontifier] -> CheckString -> Fontifications
@ -97,11 +98,13 @@ guards = slicesToFT §: "guard" §. matchGrpStripCmts 1 §~ "\\[([^
mismatchedBrackets s = concatMap (mismatched §: "err_brackets" $ s) [('(',')'),('[',']'),('{','}')] mismatchedBrackets s = concatMap (mismatched §: "err_brackets" $ s) [('(',')'),('[',']'),('{','}')]
invalidAccess s = (slicesToFT §: "err_read" $ invalidReads s) ++ invalidAccess s = let strip = prune $ (comments s) ++ (strings s) in -- removes strings and comments from fontification
(slicesToFT §: "err_write" $ invalidWrites s) (slicesToFT §: "err_read" $ strip $ invalidReads s) ++
(slicesToFT §: "err_write" $ strip $ invalidWrites s)
-- (alternative if easier than invalid read/invalid write separated) -- (alternative if easier than invalid read/invalid write separated)
-- invalidAccess = slicesToFT §: "err_access" $ invAcc -- invalidAccess s = let strip = prune $ (comments s) ++ (strings s) in
-- slicesToFT §: "err_access" $ strip $ invAcc s
{--- Utility Functions ---} {--- Utility Functions ---}