{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE QuasiQuotes #-}
module Headroom.FileSupport.Rust
( fileSupport
)
where
import Headroom.Data.Regex ( isMatch
, re
)
import Headroom.FileSupport.Types ( FileSupport(..)
, SyntaxAnalysis(..)
, defaultFileSupport
)
import Headroom.FileType.Types ( FileType(Rust) )
fileSupport :: FileSupport
fileSupport :: FileSupport
fileSupport = FileType -> SyntaxAnalysis -> FileSupport
defaultFileSupport FileType
Rust SyntaxAnalysis
syntaxAnalysis
syntaxAnalysis :: SyntaxAnalysis
syntaxAnalysis :: SyntaxAnalysis
syntaxAnalysis = SyntaxAnalysis :: (Text -> Bool) -> (Text -> Bool) -> SyntaxAnalysis
SyntaxAnalysis { saIsCommentStart :: Text -> Bool
saIsCommentStart = Regex -> Text -> Bool
isMatch [re|^\/\*|^\/\/|]
, saIsCommentEnd :: Text -> Bool
saIsCommentEnd = Regex -> Text -> Bool
isMatch [re|\*\/$|^\/\/|]
}