summaryrefslogtreecommitdiff
path: root/src/Parser.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-10-08 22:29:35 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2022-10-08 22:29:35 +0200
commited4dcb61f8a13a3cbfee1c30ea2cb12b5fd3c1ec (patch)
tree221e97031660dd1ce2a7d1bde16a28e551037b15 /src/Parser.hs
parentff745aeb332e29566814cec87090f1188bca83ec (diff)
Node command to declare new node variable
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index 7773bae..a33b429 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -476,6 +476,11 @@ testLocal = do
indent <- L.indentGuard scn GT ref
localState $ testBlock indent
+testNode :: TestParser [TestStep]
+testNode = command "node" $ DeclNode
+ <$> param ""
+ <*> innerBlock
+
testSpawn :: TestParser [TestStep]
testSpawn = command "spawn" $ Spawn
<$> param "as"
@@ -528,6 +533,7 @@ testStep :: TestParser [TestStep]
testStep = choice
[ letStatement
, testLocal
+ , testNode
, testSpawn
, testSend
, testExpect