summaryrefslogtreecommitdiff
path: root/src/Parser.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.hs
parent18ced99f826746a19aa6c0b351673d132f86421a (diff)
Replace first command (wait) with a builtin
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index 4fd60b5..405622e 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -22,6 +22,7 @@ import Parser.Core
import Parser.Expr
import Parser.Statement
import Test
+import Test.Builtins
parseTestDefinition :: TestParser Test
parseTestDefinition = label "test definition" $ toplevel $ do
@@ -55,7 +56,7 @@ parseTestFile path = do
content <- TL.readFile path
absPath <- makeAbsolute path
let initState = TestParserState
- { testVars = []
+ { testVars = map (fmap someVarValueType) builtins
, testContext = SomeExpr RootNetwork
}
case evalState (runParserT (parseTestModule absPath) path content) initState of