diff options
| author | Eugen Wissner <belka@caraus.de> | 2024-09-08 02:08:13 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2024-09-08 02:08:13 +0200 |
| commit | 1cbbef19afcf997315431e3aa45f824fe8a8a0e7 (patch) | |
| tree | 8813df9aab3185a9c2b778499ecb041a6c58cead /lib/Language/Elna/Parser.hs | |
| parent | a625bbff505c912f8a19f62bcb92313a63c60ed4 (diff) | |
| download | elna-1cbbef19afcf997315431e3aa45f824fe8a8a0e7.tar.gz | |
Stub the implementation for all phases
Diffstat (limited to 'lib/Language/Elna/Parser.hs')
| -rw-r--r-- | lib/Language/Elna/Parser.hs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Language/Elna/Parser.hs b/lib/Language/Elna/Parser.hs index aa7c315..4828bf5 100644 --- a/lib/Language/Elna/Parser.hs +++ b/lib/Language/Elna/Parser.hs @@ -3,34 +3,34 @@ module Language.Elna.Parser , programP ) where -import Control.Monad (void) -import Control.Monad.Combinators.Expr (Operator(..), makeExprParser) +-- import Control.Monad (void) +-- import Control.Monad.Combinators.Expr (Operator(..), makeExprParser) import Data.Text (Text) -import qualified Data.Text as Text +-- import qualified Data.Text as Text import Data.Void (Void) import Language.Elna.AST - ( VariableAccess(..) + ( Program(..) + {-, VariableAccess(..) , Condition(..) , Declaration(..) , Expression(..) , Identifier(..) , Literal(..) , Parameter(..) - , Program(..) , Statement(..) , TypeExpression(..) - , VariableDeclaration(..) + , VariableDeclaration(..)-} ) import Text.Megaparsec ( Parsec - , MonadParsec(..) + {-, MonadParsec(..) , (<?>) , optional , between , sepBy - , choice + , choice -} ) -import Text.Megaparsec.Char +{- import Text.Megaparsec.Char ( alphaNumChar , char , letterChar @@ -41,9 +41,9 @@ import qualified Text.Megaparsec.Char.Lexer as Lexer import Control.Applicative (Alternative(..)) import Data.Maybe (isJust) import Data.Functor (($>)) - +-} type Parser = Parsec Void Text - +{- space :: Parser () space = Lexer.space space1 (Lexer.skipLineComment "//") $ Lexer.skipBlockComment "/*" "*/" @@ -214,6 +214,6 @@ procedureDefinitionP = procedureCons declarationP :: Parser Declaration declarationP = typeDefinitionP <|> procedureDefinitionP - +-} programP :: Parser Program -programP = Program <$> many declarationP +programP = pure Program -- <$> many declarationP |
