bf6: --run

This commit is contained in:
voidlizard 2025-02-12 17:35:31 +03:00
parent acd6698dbf
commit 2029220eb8
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,13 @@ main = do
case cli of case cli of
[ListVal [SymbolVal "--run", StringLike fn]] -> do
what <- liftIO $ readFile fn
>>= either (error.show) pure . parseTop
run dict what >>= eatNil display
[ListVal [SymbolVal "stdin"]] -> do [ListVal [SymbolVal "stdin"]] -> do
what <- liftIO getContents what <- liftIO getContents
>>= either (error.show) pure . parseTop >>= either (error.show) pure . parseTop