summaryrefslogtreecommitdiff
path: root/src/Parser/Statement.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-08-07 20:59:18 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-08-07 21:51:10 +0200
commitdc2202f36f8ee220293cc6f230be604a19be8cbb (patch)
tree5201a7751ad655460d48d5e6456f8546179c25b5 /src/Parser/Statement.hs
parent18ced99f826746a19aa6c0b351673d132f86421a (diff)
Replace first command (wait) with a builtin
Diffstat (limited to 'src/Parser/Statement.hs')
-rw-r--r--src/Parser/Statement.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Parser/Statement.hs b/src/Parser/Statement.hs
index 8906cec..8dd285a 100644
--- a/src/Parser/Statement.hs
+++ b/src/Parser/Statement.hs
@@ -75,6 +75,11 @@ forStatement = do
body <- testBlock indent
return [For line tname (unpack <$> e) body]
+exprStatement :: TestParser [ TestStep ]
+exprStatement = do
+ expr <- typedExpr
+ return [ ExprStatement expr ]
+
class (Typeable a, Typeable (ParamRep a)) => ParamType a where
type ParamRep a :: Type
type ParamRep a = a
@@ -335,11 +340,6 @@ testPacketLoss = command "packet_loss" $ PacketLoss
<*> innerBlock
-testWait :: TestParser [TestStep]
-testWait = do
- wsymbol "wait"
- return [Wait]
-
testBlock :: Pos -> TestParser [TestStep]
testBlock indent = concat <$> go
where
@@ -369,5 +369,5 @@ testStep = choice
, testDisconnectNodes
, testDisconnectUpstream
, testPacketLoss
- , testWait
+ , exprStatement
]