diff options
Diffstat (limited to 'src/Language/SimpleShell/Parser.hs')
-rw-r--r-- | src/Language/SimpleShell/Parser.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Language/SimpleShell/Parser.hs b/src/Language/SimpleShell/Parser.hs index d75602b..be16c9f 100644 --- a/src/Language/SimpleShell/Parser.hs +++ b/src/Language/SimpleShell/Parser.hs @@ -4,6 +4,7 @@ module Language.SimpleShell.Parser ( Parser , lexeme , symbol + , commentFirstChars , lookupVar , lookupFun , declareVars @@ -50,12 +51,17 @@ initContext = Context } +-- Must be kept in sync with 'commentFirstChars'. sc :: Parser () sc = L.space space1 (L.skipLineComment "//") (L.skipBlockComment "/*" "*/") +-- | List of all characters that may start a comment. +commentFirstChars :: [Char] +commentFirstChars = "/" + lexeme :: Parser a -> Parser a lexeme = L.lexeme sc |