This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main (runParser, main) where | |
import Asterius.Text | |
import Asterius.Types | |
import Control.Concurrent (threadDelay) | |
import Data.Text (Text) | |
import Data.Void (Void) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as rts from "./_build/rts.mjs"; | |
import module from "./_build/Main.wasm.mjs"; | |
import req from "./_build/Main.req.mjs"; | |
module.then(m => | |
rts.newAsteriusInstance(Object.assign(req, {module: m}))) | |
.then(i => { | |
i.exports.main() | |
.catch(err => { | |
if (!(err.startsWith('ExitSuccess') || err.startsWith('ExitFailure '))) |