From 213e3523aead4c18b65ac85886203d2508b9b27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Mon, 23 Sep 2024 19:44:17 +0200 Subject: Implement "guard" as a builtin --- src/Parser/Statement.hs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/Parser/Statement.hs') diff --git a/src/Parser/Statement.hs b/src/Parser/Statement.hs index 94a5583..6434a53 100644 --- a/src/Parser/Statement.hs +++ b/src/Parser/Statement.hs @@ -8,9 +8,8 @@ import Control.Monad.State import Data.Kind import Data.Maybe -import qualified Data.Set as S +import Data.Set qualified as S import Data.Text qualified as T -import qualified Data.Text.Lazy as TL import Data.Typeable import Text.Megaparsec hiding (State) @@ -24,16 +23,6 @@ import Process (Process) import Test import Util -getSourceLine :: TestParser SourceLine -getSourceLine = do - pstate <- statePosState <$> getParserState - return $ SourceLine $ T.concat - [ T.pack $ sourcePosPretty $ pstateSourcePos pstate - , T.pack ": " - , TL.toStrict $ TL.takeWhile (/='\n') $ pstateInput pstate - ] - - letStatement :: TestParser [TestStep] letStatement = do line <- getSourceLine @@ -313,11 +302,6 @@ testFlush = command "flush" $ Flush <$> paramOrContext "from" <*> param "" -testGuard :: TestParser [TestStep] -testGuard = command "guard" $ Guard - <$> cmdLine - <*> param "" - testDisconnectNode :: TestParser [TestStep] testDisconnectNode = command "disconnect_node" $ DisconnectNode <$> paramOrContext "" @@ -364,7 +348,6 @@ testStep = choice , testSend , testExpect , testFlush - , testGuard , testDisconnectNode , testDisconnectNodes , testDisconnectUpstream -- cgit v1.2.3