2020-08-14 15:40:30 +04:00
|
|
|
|
|
|
|
module AST.Camligo.Parser where
|
|
|
|
|
|
|
|
import Data.Maybe (isJust)
|
|
|
|
|
|
|
|
import AST.Skeleton
|
|
|
|
|
|
|
|
import Duplo.Error
|
|
|
|
import Duplo.Tree
|
|
|
|
import Duplo.Pretty
|
|
|
|
|
|
|
|
import Product
|
|
|
|
import Parser
|
|
|
|
import ParseTree
|
|
|
|
|
2020-08-17 16:29:42 +04:00
|
|
|
-- import Debug.Trace
|
|
|
|
|
|
|
|
example :: FilePath
|
|
|
|
example = "../../../src/test/contracts/address.mligo"
|
|
|
|
|
|
|
|
raw :: IO ()
|
|
|
|
raw = toParseTree (Path example)
|
|
|
|
>>= print . pp
|
|
|
|
|
|
|
|
-- sample :: IO ()
|
|
|
|
-- sample
|
|
|
|
-- = toParseTree (Path example)
|
|
|
|
-- >>= runParserM . recognise
|
|
|
|
-- >>= print . pp . fst
|