aboutsummaryrefslogtreecommitdiff
path: root/src/Language/SimpleShell/Parser.hs
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2025-05-21 11:51:00 +0200
committerEinhard Leichtfuß <alguien@respiranto.de>2025-05-21 12:03:00 +0200
commitf88d78d60bad406ce775d29ec5891d8c46974119 (patch)
tree90a4421cbcb932490f5ebc84f37de49abdba37d3 /src/Language/SimpleShell/Parser.hs
parent0d0c9a61291b0fe0b9f49bdc91955ab797593fd9 (diff)
Rename auxiliary parser modules
Diffstat (limited to 'src/Language/SimpleShell/Parser.hs')
-rw-r--r--src/Language/SimpleShell/Parser.hs40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/Language/SimpleShell/Parser.hs b/src/Language/SimpleShell/Parser.hs
deleted file mode 100644
index 5f536ed..0000000
--- a/src/Language/SimpleShell/Parser.hs
+++ /dev/null
@@ -1,40 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE FlexibleContexts #-}
-
-module Language.SimpleShell.Parser
- ( lexeme
- , symbol
- , commentFirstChars
- )
-where
-
-
-import Control.Monad (void)
-import Data.Text (Text)
-import Text.Megaparsec (MonadParsec)
-import Text.Megaparsec.Char (space1)
-import qualified Text.Megaparsec.Char.Lexer as L
- ( lexeme
- , symbol
- , space
- , skipLineComment
- , skipBlockComment
- )
-
-
--- Must be kept in sync with 'commentFirstChars'.
-sc :: (MonadParsec e Text m) => m ()
-sc = L.space
- space1
- (L.skipLineComment "//")
- (L.skipBlockComment "/*" "*/")
-
--- | List of all characters that may start a comment.
-commentFirstChars :: [Char]
-commentFirstChars = "/"
-
-lexeme :: (MonadParsec e Text m) => m a -> m a
-lexeme = L.lexeme sc
-
-symbol :: (MonadParsec e Text m) => Text -> m ()
-symbol = void . L.symbol sc