Commit Graph

327 Commits

Author SHA1 Message Date
Christian Rinderknecht
b0e92a58bf Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht-dev 2019-12-24 11:59:34 +01:00
Sander Spies
29c96fb021 Fix 'dune build ParserMain.exe'. 2019-12-24 08:08:50 +01:00
Christian Rinderknecht
e6a9bf6510 Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht-dev 2019-12-23 21:46:21 +01:00
Christian Rinderknecht
24f067b69e Added nat and bytes to ReasonLIGO and CameLIGO (expressions).
Use the correct ParserAPI for ReasonLIGO now.
2019-12-23 20:37:48 +01:00
John David Pressman
1bf04574c1 Merge branch 'dev' into feature/set-delegate 2019-12-20 08:37:01 -08:00
Christian Rinderknecht
705b425589 Merge remote-tracking branch 'origin/dev' into rinderknecht-dev 2019-12-20 16:46:33 +01:00
Christian Rinderknecht
072dea757c [WIP] Adding the infrastructure for supporting the incremental API of Menhir.
* 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).
2019-12-20 16:44:03 +01:00
Lesenechal Remi
638b45611d fix message of redundant_match_case error 2019-12-20 12:17:47 +00:00
Suzanne Dupéron
f7616b7b49 Small improvements to negative typer tests 2019-12-19 17:27:17 +00:00
Suzanne Dupéron
a835bc9286 Added "did you mean" feature for unbound type names 2019-12-19 17:27:17 +00:00
Suzanne Dupéron
e919a1eba3 Fixes unsoundness in old typer (expected type for the expression as a whole was not checked for ascriptions) 2019-12-19 17:27:17 +00:00
Sander
600ae2d4f6 Move to Trace.error instead of simple_error. 2019-12-19 13:50:57 +00:00
Christian Rinderknecht
3add77eba5 Adding the build of the unlexer by dune. 2019-12-18 22:17:49 +00:00
Christian Rinderknecht
d47ec7cf7c Fixed a tag file (local build of PascaLIGO with my Makefile). 2019-12-18 22:17:49 +00:00
Tom Jack
172038cef0 Kill warning 45 by reusing Pervasives.result for Trace 2019-12-18 21:20:35 +00:00
Christian Rinderknecht
c46bf008c8 Adding the build of the unlexer by dune. 2019-12-18 21:32:12 +01:00
Christian Rinderknecht
64f04b8c40 Fixed a tag file (local build of PascaLIGO with my Makefile). 2019-12-18 16:53:32 +01:00
Christian Rinderknecht
97a6d7162f Regression. 2019-12-18 15:50:42 +01:00
Christian Rinderknecht
c7bd986772 Merge remote-tracking branch 'origin/dev' into rinderknecht-dev 2019-12-18 14:22:57 +01:00
Sander Spies
7518005532 Merge branch 'dev' of https://gitlab.com/ligolang/ligo into reasonligo-improvemtns 2019-12-18 09:59:19 +01:00
John David Pressman
310dde6dc9 [LIGO-286] Tuple destructuring doesn't do left hand type inference in CameLIGO 2019-12-17 21:04:53 +00:00
John David Pressman
7067644b1d Merge branch 'dev' into feature/set-delegate 2019-12-17 12:17:02 -08:00
John David Pressman
a4b1c9951d Add ReasonLIGO and CameLIGO tests for SET_DELEGATE 2019-12-17 09:50:47 -08:00
John David Pressman
fdeb95288d Passing SET_DELEGATE test for PascaLIGO 2019-12-17 09:34:05 -08:00
Christian Rinderknecht
078dd06132 Merge branch 'rinderknecht-dev' of gitlab.com:ligolang/ligo into rinderknecht-dev 2019-12-17 17:07:10 +01:00
Christian Rinderknecht
7ae8d9340b Merge remote-tracking branch 'origin/dev' into rinderknecht-dev 2019-12-17 17:04:59 +01:00
Christian Rinderknecht
8210a4e186 Added basic support for Menhir's incremental API.
I added the token Bytes to ReasonLIGO's [LexToken.mll] for the build.
2019-12-17 17:03:43 +01:00
Christian Rinderknecht
757b0da78c Removed the open type [Error.t] (less [assert false]).
I also had to remove the keywords [Down], [Fail] and [Step] in
PascaLIGO that made a mysterious and unwanted come back. (I did not
bother with [git blame]).
2019-12-17 15:58:27 +00:00
Christian Rinderknecht
531dd238a7 Added unlexer for PascaLIGO. 2019-12-17 15:58:27 +00:00
Christian Rinderknecht
35d4b64a02 Removed the open type [Error.t] (less [assert false]).
I also had to remove the keywords [Down], [Fail] and [Step] in
PascaLIGO that made a mysterious and unwanted come back. (I did not
bother with [git blame]).
2019-12-17 14:56:16 +01:00
Sander Spies
ebba74e7a7 Merge branch 'dev' of https://gitlab.com/ligolang/ligo into reasonligo-improvemtns 2019-12-17 14:34:58 +01:00
Lesenechal Remi
ffb225e269 fix address arity and update test 2019-12-17 11:10:29 +01:00
John David Pressman
20285f2b9e Add broken set_delegate test to LIGO, get to typer error 2019-12-16 16:26:39 -08:00
John David Pressman
fb8fae05d7 Fix IMPLICIT_ACCOUNT, again and this time add regression expect test 2019-12-16 12:10:31 -08:00
Sander Spies
52eff4e764 Incorrect function arguments message for ReasonLIGO. 2019-12-16 18:04:15 +01:00
Christian Rinderknecht
257ef4f5d2 Added unlexer for PascaLIGO. 2019-12-16 17:37:46 +01:00
Sander Spies
09875cf1da Make type_expr_simple less complicated. 2019-12-16 14:54:12 +01:00
Christian Rinderknecht
a94ee53fd3 Finished the refactoring of the parsers. 2019-12-15 20:59:04 +01:00
Christian Rinderknecht
f8d6396fcd Refactoring of the parsers
* [CameLIGO/ReasonLIGO] The AST node [EAnnot] (expressions
    annotated by a type) now records the region in the source
    code for the colon.

  * [CameLIGO/ReasonLIGO/PascaLIGO] I added the syntax
     %token <...> TOKEN "lexeme"

  * [ReasonLIGO] I changed the AST nodes [Mtz] and [Str] to
    [Mutez] and [String], respectively (in accordance with the
    PascaLIGO front-end). I changed token [DOTDOTDOT] to
    [ELLIPSIS].

  * [ReasonLIGO] I added what was missing to make a loca build
    with my Makefile.
2019-12-15 17:46:08 +01:00
Christian Rinderknecht
6692643cc5 Streamlined LexerMain and ParserMain for ReasonLIGO. 2019-12-13 17:28:15 +01:00
Christian Rinderknecht
e685e313f0 Fixed the build after I made a small error when fixing the latest
merge conflict.
2019-12-13 12:30:59 +01:00
Christian Rinderknecht
c7ffa6d563 Merge remote-tracking branch 'origin/dev' into rinderknecht-dev 2019-12-13 12:28:33 +01:00
Christian Rinderknecht
0226b9f23c Refactoring of comments (for [dune build @doc]).
Refactoring of parsing command-line arguments

  * The type [options] is now abstract and implemented as an
    object type to avoid struggling with scoping and type
    inference when record types share some common field names.

Refactoring of ParserLog for PascaLIGO and CameLIGO

  * The immediate motivation behind that refactoring was to
    remove the use of a couple of global references. A
    consequence is that we have a nicer and more compact code, by
    threading a state. The files [pascaligo/Tests/pp.ligo] and
    [ligodity/Tests/pp.mligo].

  * Another consequence is that the choice of making strings from
    AST nodes depends on the CLI (offsets? mode?). After this
    refactoring, that choice is hardcoded in the simplifiers in a
    few places (TODO), waiting for a general solution that would
    have all CL options flow through the compiler.

  * I removed the use of vendors [x_option.ml], [x_map.ml] and
    [x_list.ml] when handling optional values. (Less dependencies
    this way.)

Refactoring of the ASTs

  * I removed the node [local_decl], which was set to [[]]
    already in a previous commit (which removed local
    declarations as being redundant, as statements could already
    be instructions or declarations).

  * I changed [StrLit] to [String] in the AST of CameLIGO and
    ReasonLIGO.

  * I also changed the type [fun_expr] so now either a block is
    present, and therefore followed by the [with] keyword, or it
    is not. (Before, the presence of a block was not enforced in
    the type with the presence of the keyword.)

Notes

  * [LexerMain.ml] and [ParserMain.ml] for CameLIGO and PascaLIGO
    are almost identical and differ in the same way (language
    name and file extension), which suggests that they should be
    in the [shared] folder and instanciated as a functor in the
    future (TODO).

  * I removed the blank characters at the end of many lines in
    the parser of ReasonLIGO.
2019-12-13 12:21:52 +01:00
Sander Spies
6f9134834f Remove original Cameligo and rename Ligodity to Cameligo. 2019-12-12 14:35:07 +01:00
Lesenechal Remi
df0dfb029b better error message when a contract in invalid 2019-12-11 20:02:54 +01:00
Lesenechal Remi
85cffdfc52 remove comented function 2019-12-10 15:58:53 +01:00
Lesenechal Remi
26f26171e6 Tests clean 2019-12-10 15:58:53 +01:00
Lesenechal Remi
0cae4302cd WIP: introduce compiled_expression and unify dry-run and compile-contract 2019-12-10 15:58:53 +01:00
Lesenechal Remi
8edeb27321 add a function to fetch (param,storage) in a contract's lambda 2019-12-10 15:58:53 +01:00
Sander
95a7e19be6 Add ReasonLIGO support 2019-12-10 13:47:31 +00:00