diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-23 19:44:17 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-25 20:25:22 +0200 |
commit | 213e3523aead4c18b65ac85886203d2508b9b27e (patch) | |
tree | 6f207174a09ee312a366d0c22c08a31a056aaf3d /src/Parser/Statement.hs | |
parent | 274554243235d3013430a48973fd0f25244ac392 (diff) |
Implement "guard" as a builtin
Diffstat (limited to 'src/Parser/Statement.hs')
-rw-r--r-- | src/Parser/Statement.hs | 19 |
1 files changed, 1 insertions, 18 deletions
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 |