Refactor internal code and more add statements, definitely WIP
This commit is contained in:
@@ -147,10 +147,44 @@ Take a JSON encoding of a contract interface and generate and generate a contrac
|
||||
|
||||
#### encode_type(TypeAST) -> JSONstring.
|
||||
|
||||
Types
|
||||
|
||||
``` erlang
|
||||
JSONstring = json_string()
|
||||
```
|
||||
|
||||
Generate the JSON encoding of a type from the AST of the type.
|
||||
|
||||
#### encode_arg(ArgAST) -> JSONstring.
|
||||
|
||||
Types
|
||||
|
||||
``` erlang
|
||||
JSONstring = json_string()
|
||||
```
|
||||
|
||||
Generate the JSON encoding of a function argument from the AST of the argument.
|
||||
|
||||
#### encode_stmt(StmtAST) -> JSONstring.
|
||||
|
||||
Types
|
||||
|
||||
``` erlang
|
||||
JSONstring = json_string()
|
||||
```
|
||||
|
||||
Generate the JSON encoding of a statement from the AST of the statement.
|
||||
|
||||
#### encode_expr(ExprAST) -> JSONstring.
|
||||
|
||||
Types
|
||||
|
||||
``` erlang
|
||||
JSONstring = json_string()
|
||||
```
|
||||
|
||||
Generate the JSON encoding of an expression from the AST of the expression.
|
||||
|
||||
### Example run
|
||||
|
||||
This is an example of using the ACI generator from an Erlang shell. The file called `aci_test.aes` contains the contract in the description from which we want to generate files `aci_test.json` which is the JSON encoding of the contract interface and `aci_test.include` which is the contract definition to be included inside another contract.
|
||||
|
||||
Reference in New Issue
Block a user