diff options
-rw-r--r-- | src/Parser.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Parser.hs b/src/Parser.hs index 5b8f003..c8593b3 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -419,6 +419,19 @@ command name (CommandDef types ctor) = do ] tryParams _ _ _ _ [] = mzero +testLocal :: TestParser [TestStep] +testLocal = do + ref <- L.indentLevel + wsymbol "local" + symbol ":" + void $ eol + + indent <- L.indentGuard scn GT ref + s <- get + body <- testBlock indent + put s + return body + testSpawn :: TestParser [TestStep] testSpawn = command "spawn" $ Spawn <$> param "as" @@ -464,6 +477,7 @@ testBlock indent = concat <$> go testStep :: TestParser [TestStep] testStep = choice [ letStatement + , testLocal , testSpawn , testSend , testExpect |