put the port in the port directory

This commit is contained in:
2025-01-05 11:15:29 -08:00
parent 9262fa8b27
commit 9172d88be7
32 changed files with 0 additions and 0 deletions

26
port/Test/Parser.newt Normal file
View File

@@ -0,0 +1,26 @@
module Test.Parser
import Prelude
import Lib.Parser
import Lib.Tokenizer
import Node
main : IO Unit
main = do
let fn = "port/Lib/Parser.newt"
(Right text) <- readFile fn
| Left msg => putStrLn $ "ERROR: " ++ msg
let (Right toks) = tokenise fn text
| Left (E fc msg) => putStrLn msg
| _ => putStrLn "postpone error"
-- debugLog toks
let (OK a toks com ops) = runP parseMod toks False EmptyMap (MkFC fn (0,0))
| fail => debugLog fail
putStrLn "Module"
debugLog $ a
let (MkModule name imports decls) = a
let lines = map (render 90 pretty) decls
putStrLn $ joinBy "\n" lines