2020-04-30 17:58:35 +04:00
|
|
|
|
2020-05-08 01:18:26 +04:00
|
|
|
{-
|
|
|
|
Parser for a contract. The `example` is exported to run on current debug target.
|
|
|
|
|
|
|
|
TODO: prune some "path" and alike stuff from grammar, refactor common things.
|
|
|
|
|
|
|
|
TODO: break <*>/do ladders onto separate named parsers.
|
|
|
|
-}
|
|
|
|
|
2020-05-01 19:04:29 +04:00
|
|
|
module AST.Parser (example, contract) where
|
2020-04-30 17:58:35 +04:00
|
|
|
|
|
|
|
import Data.Text (Text)
|
|
|
|
|
2020-05-06 21:26:00 +04:00
|
|
|
import AST.Types hiding (tuple)
|
2020-04-30 17:58:35 +04:00
|
|
|
|
|
|
|
import Parser
|
|
|
|
import Range
|
2020-06-01 18:17:33 +04:00
|
|
|
import Tree
|
|
|
|
import Union
|
2020-04-30 17:58:35 +04:00
|
|
|
|
|
|
|
import Debug.Trace
|
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged
|
|
|
|
:: ( Functor f
|
|
|
|
, Member f fs
|
|
|
|
)
|
|
|
|
=> Parser (f (Tree fs ASTInfo))
|
|
|
|
-> Parser (Tree fs ASTInfo)
|
|
|
|
ranged p = do
|
|
|
|
r <- getInfo
|
|
|
|
a <- p
|
|
|
|
return $ mk r a
|
|
|
|
|
|
|
|
contract :: Parser (Pascal ASTInfo)
|
2020-05-06 21:59:34 +04:00
|
|
|
contract =
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Contract
|
|
|
|
<*> subtree "contract" do
|
|
|
|
many do
|
|
|
|
inside "declaration:" do
|
|
|
|
declaration
|
2020-04-30 17:58:35 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
name :: Parser (Pascal ASTInfo)
|
|
|
|
name = ranged do pure Name <*> token "Name"
|
2020-05-08 01:18:26 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
capitalName :: Parser (Pascal ASTInfo)
|
|
|
|
capitalName = ranged do pure Name <*> token "Name_Capital"
|
2020-05-08 01:18:26 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
declaration :: Parser (Pascal ASTInfo)
|
2020-05-06 21:59:34 +04:00
|
|
|
declaration
|
2020-06-01 18:17:33 +04:00
|
|
|
= do ranged do pure ValueDecl <*> binding
|
|
|
|
<|> do ranged do pure ValueDecl <*> vardecl
|
|
|
|
<|> do ranged do pure ValueDecl <*> constdecl
|
2020-05-08 00:09:14 +04:00
|
|
|
<|> do typedecl
|
2020-06-01 18:17:33 +04:00
|
|
|
<|> do ranged do pure Action <*> attributes
|
2020-05-08 00:09:14 +04:00
|
|
|
<|> do include
|
|
|
|
|
|
|
|
include = do
|
|
|
|
subtree "include" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Include
|
|
|
|
<*> inside "filename" do
|
|
|
|
token "String"
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
typedecl :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
typedecl = do
|
|
|
|
subtree "type_decl" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure TypeDecl
|
|
|
|
<*> inside "typeName:" name
|
|
|
|
<*> inside "typeValue:" newtype_
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
vardecl :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
vardecl = do
|
|
|
|
subtree "var_decl" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Var
|
|
|
|
<*> inside "name" name
|
|
|
|
<*> inside "type" type_
|
|
|
|
<*> inside "value" expr
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
constdecl :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
constdecl = do
|
|
|
|
subtree "const_decl" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Const
|
|
|
|
<*> inside "name" name
|
|
|
|
<*> inside "type" type_
|
|
|
|
<*> inside "value" expr
|
2020-04-30 17:58:35 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
binding :: Parser (Pascal ASTInfo)
|
2020-04-30 17:58:35 +04:00
|
|
|
binding = do
|
2020-05-06 21:26:00 +04:00
|
|
|
inside ":fun_decl" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Function
|
|
|
|
<*> recursive
|
|
|
|
<*> inside "name:" name
|
|
|
|
<*> inside "parameters:parameters" do
|
|
|
|
many do
|
|
|
|
inside "parameter" paramDecl
|
|
|
|
<*> inside "type:" type_
|
|
|
|
<*> inside "body:" letExpr
|
2020-05-06 21:59:34 +04:00
|
|
|
|
|
|
|
recursive = do
|
|
|
|
mr <- optional do
|
|
|
|
inside "recursive" do
|
2020-05-08 00:09:14 +04:00
|
|
|
token "recursive"
|
2020-05-06 21:59:34 +04:00
|
|
|
|
|
|
|
return $ maybe False (== "recursive") mr
|
2020-04-30 21:46:37 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
expr :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
expr = stubbed "expr" do
|
|
|
|
select
|
2020-05-08 01:18:26 +04:00
|
|
|
[ -- Wait, isn't it `qname`? TODO: replace.
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Ident <*> do
|
|
|
|
ranged do
|
|
|
|
pure QualifiedName
|
|
|
|
<*> name
|
|
|
|
<*> pure []
|
2020-05-06 21:26:00 +04:00
|
|
|
, opCall
|
|
|
|
, fun_call
|
|
|
|
, record_expr
|
|
|
|
, int_literal
|
2020-05-06 22:45:33 +04:00
|
|
|
, tez_literal
|
2020-05-06 21:26:00 +04:00
|
|
|
, par_call
|
|
|
|
, method_call
|
2020-05-06 22:45:33 +04:00
|
|
|
, if_expr
|
|
|
|
, assign
|
|
|
|
, list_expr
|
|
|
|
, has_type
|
|
|
|
, string_literal
|
2020-05-06 23:19:28 +04:00
|
|
|
, attributes
|
2020-05-07 00:31:05 +04:00
|
|
|
, tuple_expr
|
|
|
|
, moduleQualified
|
|
|
|
, big_map_expr
|
|
|
|
, map_expr
|
|
|
|
, map_remove
|
2020-05-08 00:09:14 +04:00
|
|
|
, indexing
|
|
|
|
, constr_call
|
|
|
|
, nat_literal
|
|
|
|
, nullary_ctor
|
|
|
|
, bytes_literal
|
|
|
|
, case_expr
|
|
|
|
, skip
|
|
|
|
, case_action
|
|
|
|
, clause_block
|
|
|
|
, loop
|
|
|
|
, seq_expr
|
|
|
|
, lambda_expr
|
|
|
|
, set_expr
|
|
|
|
, map_patch
|
|
|
|
, record_update
|
|
|
|
, set_patch
|
|
|
|
, set_remove
|
2020-05-06 21:26:00 +04:00
|
|
|
]
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
set_remove :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
set_remove = do
|
|
|
|
subtree "set_remove" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure SetRemove
|
|
|
|
<*> inside "key" expr
|
|
|
|
<*> inside "container" do
|
|
|
|
inside ":path" do
|
|
|
|
qname <|> projection
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
set_patch :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
set_patch = do
|
|
|
|
subtree "set_patch" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure SetPatch
|
|
|
|
<*> inside "container:path" (qname <|> projection)
|
|
|
|
<*> many do inside "key" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
record_update = do
|
|
|
|
subtree "update_record" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure RecordUpd
|
|
|
|
<*> inside "record:path" do qname <|> projection
|
|
|
|
<*> many do inside "assignment" field_path_assignment
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
field_path_assignment = do
|
|
|
|
subtree "field_path_assignment" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure FieldAssignment
|
|
|
|
<*> inside "lhs:path" do qname <|> projection
|
|
|
|
<*> inside "_rhs" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
map_patch = do
|
|
|
|
subtree "map_patch" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure MapPatch
|
|
|
|
<*> inside "container:path" (qname <|> projection)
|
|
|
|
<*> many do inside "binding" map_binding
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
set_expr :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
set_expr = do
|
|
|
|
subtree "set_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure List <*> many do
|
|
|
|
inside "element" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
lambda_expr = do
|
|
|
|
subtree "fun_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Lambda
|
|
|
|
<*> inside "parameters:parameters" do
|
|
|
|
many do inside "parameter" paramDecl
|
|
|
|
<*> inside "type" newtype_
|
|
|
|
<*> inside "body" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
seq_expr = do
|
|
|
|
subtree "block" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Seq <*> many do
|
|
|
|
inside "statement" do
|
|
|
|
declaration <|> statement
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
loop = do
|
|
|
|
subtree "loop" do
|
|
|
|
for_loop <|> while_loop <|> for_container
|
|
|
|
|
|
|
|
for_container = do
|
|
|
|
subtree "for_loop" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure ForBox
|
|
|
|
<*> inside "key" name
|
|
|
|
<*> optional do inside "value" name
|
|
|
|
<*> inside "kind" anything
|
|
|
|
<*> inside "collection" expr
|
|
|
|
<*> inside "body" (expr <|> seq_expr)
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
while_loop = do
|
|
|
|
subtree "while_loop" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure WhileLoop
|
|
|
|
<*> inside "breaker" expr
|
|
|
|
<*> inside "body" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
for_loop = do
|
|
|
|
subtree "for_loop" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure ForLoop
|
|
|
|
<*> inside "name" name
|
|
|
|
<*> inside "begin" expr
|
|
|
|
<*> inside "end" expr
|
|
|
|
<*> inside "body" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
clause_block = do
|
|
|
|
subtree "clause_block" do
|
|
|
|
inside "block:block" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Seq <*> many do
|
|
|
|
inside "statement" (declaration <|> statement)
|
2020-05-08 00:09:14 +04:00
|
|
|
<|> do
|
|
|
|
subtree "clause_block" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Seq <*> many do
|
|
|
|
inside "statement" (declaration <|> statement)
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
skip :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
skip = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Skip
|
|
|
|
<* token "skip"
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
case_action :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
case_action = do
|
|
|
|
subtree "case_instr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Case
|
|
|
|
<*> inside "subject" expr
|
|
|
|
<*> many do
|
|
|
|
inside "case" alt_action
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
alt_action :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
alt_action = do
|
|
|
|
subtree "case_clause_instr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Alt
|
|
|
|
<*> inside "pattern" pattern
|
|
|
|
<*> inside "body:if_clause" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
case_expr :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
case_expr = do
|
|
|
|
subtree "case_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Case
|
|
|
|
<*> inside "subject" expr
|
|
|
|
<*> many do
|
|
|
|
inside "case" alt
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
alt :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
alt = do
|
|
|
|
subtree "case_clause_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Alt
|
|
|
|
<*> inside "pattern" pattern
|
|
|
|
<*> inside "body" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
pattern = do
|
|
|
|
subtree "pattern" $ do
|
|
|
|
inside "the" core_pattern
|
|
|
|
<|>
|
2020-06-01 18:17:33 +04:00
|
|
|
do ranged do
|
|
|
|
pure IsCons
|
|
|
|
<*> inside "head" core_pattern
|
|
|
|
<*> inside "tail" pattern
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
core_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
core_pattern
|
2020-05-08 01:18:26 +04:00
|
|
|
= constr_pattern
|
2020-05-08 00:09:14 +04:00
|
|
|
<|> string_pattern
|
|
|
|
<|> int_pattern
|
|
|
|
<|> nat_pattern
|
|
|
|
<|> tuple_pattern
|
|
|
|
<|> list_pattern
|
|
|
|
<|> some_pattern
|
|
|
|
<|> var_pattern
|
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
var_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
var_pattern =
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsVar <*> name
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
some_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
some_pattern = do
|
|
|
|
subtree "Some_pattern" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsConstr
|
|
|
|
<*> inside "constr" do
|
|
|
|
ranged do
|
|
|
|
pure Name <*> token "Some"
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
<*> do Just <$> inside "arg" pattern
|
|
|
|
|
|
|
|
string_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
string_pattern =
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsConstant <*> do
|
|
|
|
ranged do
|
|
|
|
pure String <*> token "String"
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
nat_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
nat_pattern =
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsConstant <*> do
|
|
|
|
ranged do
|
|
|
|
pure Nat <*> token "Nat"
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
int_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
int_pattern =
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsConstant <*> do
|
|
|
|
ranged do
|
|
|
|
pure Int <*> token "Int"
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
constr_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
constr_pattern =
|
|
|
|
do
|
|
|
|
subtree "user_constr_pattern" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsConstr
|
|
|
|
<*> inside "constr:constr" capitalName
|
|
|
|
<*> optional do
|
|
|
|
inside "arguments" tuple_pattern
|
2020-05-08 00:09:14 +04:00
|
|
|
<|>
|
|
|
|
do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsConstr
|
|
|
|
<*> ranged do
|
|
|
|
pure Name <*> do
|
|
|
|
true <|> false <|> none <|> unit
|
|
|
|
<*> pure Nothing
|
|
|
|
|
|
|
|
tuple_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
tuple_pattern = do
|
|
|
|
subtree "tuple_pattern" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsTuple <*> many do
|
|
|
|
inside "element" pattern
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
list_pattern :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
list_pattern = do
|
|
|
|
subtree "list_pattern" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure IsList <*> many do
|
|
|
|
inside "element" pattern
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
nullary_ctor :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
nullary_ctor = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Ident <*> do
|
|
|
|
ranged do
|
|
|
|
pure QualifiedName
|
|
|
|
<*> ranged do
|
|
|
|
pure Name <*> do
|
|
|
|
true <|> false <|> none <|> unit
|
|
|
|
<*> pure []
|
2020-05-08 20:11:12 +04:00
|
|
|
|
|
|
|
true = token "True"
|
|
|
|
false = token "False"
|
|
|
|
none = token "None"
|
|
|
|
unit = token "Unit"
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
nat_literal :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
nat_literal = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Constant <*> do
|
|
|
|
ranged do
|
|
|
|
pure Nat <*> token "Nat"
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
bytes_literal :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
bytes_literal = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Constant <*> do
|
|
|
|
ranged do
|
|
|
|
pure Bytes <*> token "Bytes"
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
constr_call :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
constr_call = do
|
|
|
|
some_call <|> user_constr_call
|
2020-05-01 22:41:07 +04:00
|
|
|
where
|
2020-05-08 00:09:14 +04:00
|
|
|
some_call = do
|
|
|
|
subtree "Some_call" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Apply
|
|
|
|
<*> ranged do
|
|
|
|
pure Ident <*> inside "constr" qname'
|
|
|
|
<*> inside "arguments:arguments" do
|
|
|
|
many do inside "argument" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
user_constr_call = do
|
|
|
|
subtree "constr_call" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Apply
|
|
|
|
<*> inside "constr:constr" do
|
|
|
|
ranged do
|
|
|
|
pure Ident <*> do
|
|
|
|
ranged do
|
|
|
|
pure QualifiedName
|
|
|
|
<*> capitalName
|
|
|
|
<*> pure []
|
|
|
|
<*> inside "arguments:arguments" do
|
|
|
|
many do
|
|
|
|
inside "argument" expr
|
|
|
|
|
|
|
|
indexing :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
indexing = do
|
|
|
|
subtree "map_lookup" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Indexing
|
|
|
|
<*> inside "container:path" do
|
|
|
|
qname <|> projection
|
|
|
|
<*> inside "index" expr
|
2020-05-01 22:41:07 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
map_remove :: Parser (Pascal ASTInfo)
|
2020-05-07 00:31:05 +04:00
|
|
|
map_remove = do
|
|
|
|
subtree "map_remove" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure MapRemove
|
|
|
|
<*> inside "key" expr
|
|
|
|
<*> inside "container" do
|
|
|
|
inside ":path" do
|
|
|
|
qname <|> projection
|
2020-05-07 00:31:05 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
big_map_expr :: Parser (Pascal ASTInfo)
|
2020-05-07 00:31:05 +04:00
|
|
|
big_map_expr = do
|
|
|
|
subtree "big_map_injection" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure BigMap <*> many do
|
|
|
|
inside "binding" do
|
|
|
|
map_binding
|
2020-05-07 00:31:05 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
map_expr :: Parser (Pascal ASTInfo)
|
2020-05-07 00:31:05 +04:00
|
|
|
map_expr = do
|
|
|
|
subtree "map_injection" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Map <*> many do
|
|
|
|
inside "binding" do
|
|
|
|
map_binding
|
2020-05-07 00:31:05 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
map_binding :: Parser (Pascal ASTInfo)
|
2020-05-07 00:31:05 +04:00
|
|
|
map_binding = do
|
|
|
|
subtree "binding" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure MapBinding
|
|
|
|
<*> inside "key" expr
|
|
|
|
<*> inside "value" expr
|
2020-05-07 00:31:05 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
moduleQualified :: Parser (Pascal ASTInfo)
|
2020-05-07 00:31:05 +04:00
|
|
|
moduleQualified = do
|
|
|
|
subtree "module_field" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Ident <*> do
|
|
|
|
ranged do
|
|
|
|
pure QualifiedName
|
|
|
|
<*> inside "module" capitalName
|
|
|
|
<*> do pure <$> ranged do
|
|
|
|
pure At <*> inside "method" do name <|> name'
|
|
|
|
|
|
|
|
tuple_expr :: Parser (Pascal ASTInfo)
|
2020-05-07 00:31:05 +04:00
|
|
|
tuple_expr = do
|
|
|
|
subtree "tuple_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Tuple <*> many do
|
|
|
|
inside "element" expr
|
2020-05-07 00:31:05 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
attributes :: Parser (Pascal ASTInfo)
|
2020-05-06 23:19:28 +04:00
|
|
|
attributes = do
|
|
|
|
subtree "attr_decl" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Attrs <*> many do
|
|
|
|
inside "attribute" do
|
|
|
|
token "String"
|
2020-05-06 23:19:28 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
string_literal :: Parser (Pascal ASTInfo)
|
2020-05-06 22:45:33 +04:00
|
|
|
string_literal = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Constant <*> do
|
|
|
|
ranged do
|
|
|
|
pure String <*> do
|
|
|
|
token "String"
|
2020-05-06 22:45:33 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
has_type :: Parser (Pascal ASTInfo)
|
2020-05-06 22:45:33 +04:00
|
|
|
has_type = do
|
|
|
|
subtree "annot_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Annot
|
|
|
|
<*> inside "subject" expr
|
|
|
|
<*> inside "type" type_
|
2020-05-06 22:45:33 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
list_expr :: Parser (Pascal ASTInfo)
|
2020-05-06 22:45:33 +04:00
|
|
|
list_expr = do
|
|
|
|
subtree "list_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure List <*> many do
|
2020-05-06 22:45:33 +04:00
|
|
|
inside "element" expr
|
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
qname :: Parser (Pascal ASTInfo)
|
2020-05-06 22:45:33 +04:00
|
|
|
qname = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure QualifiedName
|
|
|
|
<*> name
|
|
|
|
<*> pure []
|
2020-05-06 22:45:33 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
qname' :: Parser (Pascal ASTInfo)
|
2020-05-08 00:09:14 +04:00
|
|
|
qname' = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure QualifiedName
|
|
|
|
<*> name'
|
|
|
|
<*> pure []
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
assign :: Parser (Pascal ASTInfo)
|
2020-05-06 22:45:33 +04:00
|
|
|
assign = do
|
|
|
|
subtree "assignment" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Assign
|
|
|
|
<*> inside "LHS" lhs
|
|
|
|
<*> inside "RHS" expr
|
2020-05-06 22:45:33 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
lhs :: Parser (Pascal ASTInfo)
|
2020-05-07 00:31:05 +04:00
|
|
|
lhs =
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure LHS
|
|
|
|
<*> inside "container:path" do
|
|
|
|
qname <|> projection
|
|
|
|
<*> pure Nothing
|
2020-05-07 00:31:05 +04:00
|
|
|
<|>
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure LHS
|
|
|
|
<*> subtree "path" do
|
|
|
|
qname <|> projection
|
|
|
|
<*> pure Nothing
|
2020-05-07 00:31:05 +04:00
|
|
|
<|>
|
2020-06-01 18:17:33 +04:00
|
|
|
subtree "map_lookup" do
|
|
|
|
ranged do
|
|
|
|
pure LHS
|
|
|
|
<*> inside "container:path" do
|
|
|
|
qname <|> projection
|
|
|
|
<*> inside "index" do
|
|
|
|
Just <$> expr
|
2020-05-07 00:31:05 +04:00
|
|
|
|
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
tez_literal :: Parser (Pascal ASTInfo)
|
2020-05-06 22:45:33 +04:00
|
|
|
tez_literal = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Constant <*> do
|
|
|
|
ranged do
|
|
|
|
pure Tez <*> token "Tez"
|
2020-05-06 22:45:33 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
if_expr :: Parser (Pascal ASTInfo)
|
2020-05-06 22:45:33 +04:00
|
|
|
if_expr = do
|
2020-05-08 00:09:14 +04:00
|
|
|
subtree "conditional" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure If
|
|
|
|
<*> inside "selector" expr
|
|
|
|
<*> inside "then:if_clause" expr
|
|
|
|
<*> inside "else:if_clause" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
<|> do
|
|
|
|
subtree "cond_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure If
|
|
|
|
<*> inside "selector" expr
|
|
|
|
<*> inside "then" expr
|
|
|
|
<*> inside "else" expr
|
2020-05-06 22:45:33 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
method_call :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
method_call = do
|
|
|
|
subtree "projection_call" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure apply'
|
|
|
|
<*> getInfo
|
|
|
|
<*> inside "f" projection
|
|
|
|
<*> optional do inside "arguments" arguments
|
2020-05-08 00:09:14 +04:00
|
|
|
where
|
2020-06-01 18:17:33 +04:00
|
|
|
apply' i f (Just xs) = Apply (mk i $ Ident f) xs
|
|
|
|
apply' i f _ = Ident f
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
projection :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
projection = do
|
|
|
|
subtree "data_projection" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure QualifiedName
|
|
|
|
<*> inside "struct" name
|
|
|
|
<*> many selection
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
selection :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
selection = do
|
2020-05-07 00:31:05 +04:00
|
|
|
inside "index:selection"
|
2020-06-01 18:17:33 +04:00
|
|
|
$ ranged do pure At <*> name
|
|
|
|
<|> ranged do pure Ix <*> token "Int"
|
2020-05-07 00:31:05 +04:00
|
|
|
<|>
|
|
|
|
inside "index" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do pure Ix <*> token "Int"
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
par_call :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
par_call = do
|
|
|
|
subtree "par_call" do
|
2020-06-01 18:17:33 +04:00
|
|
|
pure apply'
|
|
|
|
<*> getInfo
|
2020-05-06 21:59:34 +04:00
|
|
|
<*> inside "f" expr
|
2020-05-08 00:09:14 +04:00
|
|
|
<*> optional do inside "arguments" arguments
|
|
|
|
where
|
2020-06-01 18:17:33 +04:00
|
|
|
apply'
|
|
|
|
:: ASTInfo
|
|
|
|
-> Pascal ASTInfo
|
|
|
|
-> Maybe [Pascal ASTInfo]
|
|
|
|
-> Pascal ASTInfo
|
|
|
|
apply' i f (Just xs) = mk i $ Apply f xs
|
|
|
|
apply' i f _ = f
|
|
|
|
|
|
|
|
int_literal :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
int_literal = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Constant
|
|
|
|
<*> ranged do
|
|
|
|
pure Int <*> token "Int"
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
record_expr :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
record_expr = do
|
|
|
|
subtree "record_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Record <*> many do
|
|
|
|
inside "assignment:field_assignment" do
|
|
|
|
ranged do
|
|
|
|
pure Assignment
|
|
|
|
<*> inside "name" name
|
|
|
|
<*> inside "_rhs" expr
|
|
|
|
|
|
|
|
fun_call :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
fun_call = do
|
|
|
|
subtree "fun_call" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Apply
|
|
|
|
<*> ranged do pure Ident <*> inside "f" function_id
|
|
|
|
<*> inside "arguments" arguments
|
2020-05-06 21:26:00 +04:00
|
|
|
|
|
|
|
arguments =
|
|
|
|
subtree "arguments" do
|
2020-05-08 20:11:12 +04:00
|
|
|
many do inside "argument" expr
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
function_id :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
function_id = select
|
2020-05-06 22:45:33 +04:00
|
|
|
[ qname
|
2020-05-06 21:26:00 +04:00
|
|
|
, do
|
|
|
|
subtree "module_field" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure QualifiedName
|
|
|
|
<*> inside "module" capitalName
|
|
|
|
<*> do pure <$> ranged do
|
|
|
|
pure At <*> inside "method" do name <|> name'
|
2020-05-06 21:26:00 +04:00
|
|
|
]
|
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
opCall :: Parser (Pascal ASTInfo)
|
2020-05-06 21:26:00 +04:00
|
|
|
opCall = do
|
2020-05-06 21:59:34 +04:00
|
|
|
subtree "op_expr"
|
|
|
|
$ do inside "the" expr
|
2020-06-01 18:17:33 +04:00
|
|
|
<|> ranged do
|
|
|
|
pure BinOp
|
|
|
|
<*> inside "arg1" expr
|
|
|
|
<*> inside "op" anything
|
|
|
|
<*> inside "arg2" expr
|
|
|
|
<|> ranged do
|
|
|
|
pure UnOp
|
|
|
|
<*> inside "negate" anything
|
|
|
|
<*> inside "arg" expr
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-05-01 22:41:07 +04:00
|
|
|
letExpr = do
|
|
|
|
subtree "let_expr" do
|
2020-06-01 18:17:33 +04:00
|
|
|
pure let'
|
|
|
|
<*> getInfo
|
2020-05-06 21:59:34 +04:00
|
|
|
<*> optional do
|
|
|
|
inside "locals:block" do
|
2020-05-08 20:11:12 +04:00
|
|
|
many do
|
2020-05-06 21:59:34 +04:00
|
|
|
inside "statement" do
|
|
|
|
declaration <|> statement
|
|
|
|
<*> inside "body"expr
|
|
|
|
where
|
|
|
|
let' r decls body = case decls of
|
2020-06-01 18:17:33 +04:00
|
|
|
Just them -> mk r $ Let them body
|
2020-05-01 22:41:07 +04:00
|
|
|
Nothing -> body
|
2020-04-30 17:58:35 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
statement :: Parser (Pascal ASTInfo)
|
|
|
|
statement = ranged do pure Action <*> expr
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
paramDecl :: Parser (Pascal ASTInfo)
|
2020-04-30 17:58:35 +04:00
|
|
|
paramDecl = do
|
2020-05-08 00:09:14 +04:00
|
|
|
subtree "param_decl" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Decl
|
|
|
|
<*> inside "access" do
|
|
|
|
ranged do
|
|
|
|
pure access' <*> anything
|
|
|
|
<*> inside "name" name
|
|
|
|
<*> inside "type" type_
|
2020-05-08 20:38:41 +04:00
|
|
|
where
|
2020-06-01 18:17:33 +04:00
|
|
|
access' "var" = Mutable
|
|
|
|
access' "const" = Immutable
|
2020-05-06 21:26:00 +04:00
|
|
|
|
|
|
|
newtype_ = select
|
|
|
|
[ record_type
|
|
|
|
, type_
|
2020-05-08 00:09:14 +04:00
|
|
|
, sum_type
|
2020-05-06 21:26:00 +04:00
|
|
|
]
|
|
|
|
|
2020-05-08 00:09:14 +04:00
|
|
|
sum_type = do
|
|
|
|
subtree "sum_type" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure TSum <*> many do
|
|
|
|
inside "variant" variant
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
variant = do
|
|
|
|
subtree "variant" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure Variant
|
|
|
|
<*> inside "constructor:constr" capitalName
|
|
|
|
<*> optional do inside "arguments" type_
|
2020-05-08 00:09:14 +04:00
|
|
|
|
2020-05-06 21:26:00 +04:00
|
|
|
record_type = do
|
|
|
|
subtree "record_type" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure TRecord <*> many do
|
|
|
|
inside "field" do
|
|
|
|
field_decl
|
2020-05-06 21:26:00 +04:00
|
|
|
|
|
|
|
field_decl = do
|
|
|
|
subtree "field_decl" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure TField
|
|
|
|
<*> inside "fieldName" name
|
|
|
|
<*> inside "fieldType" newtype_
|
2020-04-30 17:58:35 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
type_ :: Parser (Pascal ASTInfo)
|
2020-04-30 17:58:35 +04:00
|
|
|
type_ =
|
|
|
|
fun_type
|
|
|
|
where
|
2020-06-01 18:17:33 +04:00
|
|
|
fun_type :: Parser (Pascal ASTInfo)
|
2020-04-30 17:58:35 +04:00
|
|
|
fun_type = do
|
2020-05-06 21:26:00 +04:00
|
|
|
inside ":fun_type" do
|
2020-06-01 18:17:33 +04:00
|
|
|
pure tarrow
|
|
|
|
<*> getInfo
|
2020-05-06 21:59:34 +04:00
|
|
|
<*> inside "domain" cartesian
|
|
|
|
<*> optional do inside "codomain" fun_type
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-05-06 21:59:34 +04:00
|
|
|
where
|
2020-06-01 18:17:33 +04:00
|
|
|
tarrow i domain codomain =
|
2020-05-06 21:59:34 +04:00
|
|
|
case codomain of
|
2020-06-01 18:17:33 +04:00
|
|
|
Just co -> mk i $ TArrow domain co
|
2020-05-06 21:59:34 +04:00
|
|
|
Nothing -> domain
|
2020-04-30 17:58:35 +04:00
|
|
|
|
|
|
|
cartesian = do
|
2020-05-06 21:26:00 +04:00
|
|
|
inside ":cartesian" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure TProduct <*> some do
|
|
|
|
inside "element" do
|
|
|
|
core_type
|
2020-04-30 17:58:35 +04:00
|
|
|
|
|
|
|
core_type = do
|
|
|
|
select
|
2020-06-01 18:17:33 +04:00
|
|
|
[ ranged do pure TVar <*> name
|
2020-05-06 21:26:00 +04:00
|
|
|
, subtree "invokeBinary" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure TApply
|
|
|
|
<*> inside "typeConstr" name'
|
|
|
|
<*> inside "arguments" typeTuple
|
2020-05-06 22:45:33 +04:00
|
|
|
, subtree "invokeUnary" do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do
|
|
|
|
pure TApply
|
|
|
|
<*> inside "typeConstr" name'
|
|
|
|
<*> do pure <$> inside "arguments" type_
|
2020-05-08 00:09:14 +04:00
|
|
|
|
|
|
|
, subtree "type_expr" newtype_
|
2020-04-30 17:58:35 +04:00
|
|
|
]
|
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
name' :: Parser (Pascal ASTInfo)
|
2020-05-06 22:45:33 +04:00
|
|
|
name' = do
|
2020-06-01 18:17:33 +04:00
|
|
|
ranged do pure Name <*> anything
|
2020-05-06 22:45:33 +04:00
|
|
|
|
2020-06-01 18:17:33 +04:00
|
|
|
typeTuple :: Parser [Pascal ASTInfo]
|
2020-05-06 21:26:00 +04:00
|
|
|
typeTuple = do
|
|
|
|
subtree "type_tuple" do
|
2020-05-08 20:11:12 +04:00
|
|
|
many do inside "element" type_
|
2020-05-06 21:26:00 +04:00
|
|
|
|
2020-05-06 22:15:19 +04:00
|
|
|
-- example = "../../../src/test/contracts/application.ligo"
|
2020-05-06 21:26:00 +04:00
|
|
|
-- example = "../../../src/test/contracts/address.ligo"
|
2020-05-06 22:45:33 +04:00
|
|
|
-- example = "../../../src/test/contracts/amount.ligo"
|
2020-05-06 23:19:28 +04:00
|
|
|
-- example = "../../../src/test/contracts/annotation.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/arithmetic.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/assign.ligo"
|
2020-05-07 00:31:05 +04:00
|
|
|
-- example = "../../../src/test/contracts/attributes.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/bad_timestamp.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/bad_type_operator.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/balance_constant.ligo"
|
2020-05-08 00:09:14 +04:00
|
|
|
-- example = "../../../src/test/contracts/big_map.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/bitwise_arithmetic.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/blockless.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/boolean_operators.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/bytes_arithmetic.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/bytes_unpack.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/chain_id.ligo"
|
2020-05-08 21:30:19 +04:00
|
|
|
example = "../../../src/test/contracts/coase.ligo"
|
2020-05-08 20:38:41 +04:00
|
|
|
-- example = "../../../src/test/contracts/failwith.ligo"
|
2020-05-08 21:30:19 +04:00
|
|
|
-- example = "../../../src/test/contracts/loop.ligo"
|
2020-05-07 00:31:05 +04:00
|
|
|
-- example = "../../../src/test/contracts/application.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/application.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/application.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/application.ligo"
|
|
|
|
-- example = "../../../src/test/contracts/application.ligo"
|
2020-05-06 21:26:00 +04:00
|
|
|
-- example = "../../../src/test/contracts/application.ligo"
|