* Ast_typed stage is now aware of the main function name
* main function type is checked against expected contract types
* Tezos.self (returning contract type) is checked against main function type
* In general, Ast_typed.compile signature has been changed to enable/disable contract-related checks
* Reverted [pos.mli] to the previous signature, except [Pos.min]
that now takes a labelled parameter [file].
* Reverted [ParserAPI.ml] to the previous signature.
* Reexported [shor_error] in [ParserUnit].
* Changed the modules [LexToken] so that they export one function
to make attributes, the first, additional paramater being "[@"
or "[@@" (and invalid in PascaLIGO).
* Added support in all [ParserLog] for attributes (pretty-printings).
* Added AST nodes [Attr] and [AttrDecl] to PascaLIGO. The simplifier
takes care of hooking them with their respective declarations
or discarding them. (In the future, we should issue a warning for detached
attributes.)
Some weeks ago, anonymous functions as expressions were added to
PascaLIGO, unfortunately in a manner that allowed in theory for
contexts in which a named function was found when an anonymous was
expected, and vice-versa. That explains that the simplifier had two new possible errors:
* unexpected_anonymous_function
("you provided a function declaration without name")
* unexpected_named_function
I changed the AST and the parser so that function expressions
correspond to anonymous functions (without block) and function
declarations correspond to named functions.
I also removed a error in the simplifier, which was unused:
* bad_bytes
("you provided a function expression with a name (remove it)")
* I added CLI option "--mono" to select the monolithic API of Menhir.
* I added a field "win" to the state of the lexer (a two-token
window for error reporting).
* I escaped LIGO strings before making them OCaml strings (for
example for printing).