Commit Graph

84 Commits

Author SHA1 Message Date
Rémi Lesenechal
567515a5ce Merge branch 'feature/initial_req_serokell' into 'dev'
get-scope command

See merge request ligolang/ligo!690
2020-07-03 11:57:53 +00:00
Christian Rinderknecht
6c50ec0ed1 Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht@pprint_comments 2020-07-01 20:49:05 +02:00
Lesenechal Remi
8a551114c3 ignore generated variables 2020-07-01 01:22:10 +02:00
Lesenechal Remi
2659570b8a get-scope command. New module Ligo.scopes 2020-07-01 01:22:10 +02:00
Lesenechal Remi
2a9ef440db to_json for locations 2020-07-01 01:22:10 +02:00
Lesenechal Remi
ca2ec3d795 use Yojson.t isntead of Yojson.Basic.t 2020-07-01 01:22:10 +02:00
Tom Jack
ead7832c50 Fix some polymorphic comparison bugs 2020-06-30 14:31:04 -05:00
Christian Rinderknecht
b304b82e11 Merge branch 'dev' into rinderknecht@pprint_comments 2020-06-30 17:10:48 +02:00
Christian Rinderknecht
d1b7388550 Refactoring of the dune files, minimised dependencies. 2020-06-30 14:34:15 +02:00
Pierre-Emmanuel Wulfman
bc259fcde7 Feature/transpiler 2020-06-29 13:05:34 +00:00
Lesenechal Remi
351018f8d2 errors for compare in the new typer 2020-06-24 19:24:08 +02:00
Suzanne Dupéron
283dcf418a Debug prints for the new typer 2020-06-24 02:07:02 +01:00
Lesenechal Remi
c6b95bf07a result monad refactoring:
- do not use plain JSON rep for errors and use polymorphic variants instead
- split formatting for human readable and JSON output
- no more simple_errors simple_fails
- much less result bindings used in stages
2020-06-15 14:45:28 +02:00
Suzanne Dupéron
92069077df Auto-generated comparator for AST_typed 2020-05-25 20:42:16 +01:00
Pierre-Emmanuel Wulfman
f6ff6b85c4 add ligo_string in simple_utils 2020-05-18 12:56:47 +02:00
Lesenechal Remi
3333742037 Converters for michelson types 2020-05-02 15:30:10 +02:00
edb3fce642 Add nix as a build system
* Dynamically linked executables (ligo-bin)
* Statically linked executables (ligo-static)
* Docker (ligo-docker)
* deb package (ligo-deb)
* webide (ligo-editor)
* webide docker (ligo-editor-docker)
* website (ligo-website)
2020-04-29 19:40:04 +01:00
Christian Rinderknecht
c0ee726fb2 Simple_utils is now used as a library by the local builds.
Preprocessor is now a library installed by opam.
Replaced ligolang@gmail.com by contact@ligolang.org in opam files.
Reformatted some opam files.
Removed #line directive from preprocessor.
Added to the interface of ParserUnit.
Script messages.sh now checks the identity of .msg and .msg.old
to avoid undue warning about possibly different LR items.
2020-04-07 18:33:46 +02:00
Lesenechal Remi
e2776e9849 New checks in the self_ast_typed pass:
* 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
2020-03-09 11:23:08 +01:00
Pierre-Emmanuel Wulfman
9de45285b2 remove Var.show 2020-02-18 14:19:11 +01:00
Lesenechal Remi
29959ec915 Initial LIGO interpreter version 2020-02-09 18:22:33 +01:00
Pierre-Emmanuel Wulfman
ae82144418 removing assign, tuples, sequences, 2020-02-09 00:31:30 +01:00
Christian Rinderknecht
fc3385389b [WIP] Refactoring the front-end. 2020-01-27 16:05:47 +01:00
Christian Rinderknecht
4f4294bf56 Refactoring of the front-end towards integration of the local builds
and the globol build, using the parser error messages, for instance.
2020-01-23 18:28:04 +01:00
Christian Rinderknecht
7437d6ae1a Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht-dev 2020-01-22 11:43:35 +01:00
Lesenechal Remi
8237947c4d monad fix 2020-01-21 19:04:51 +01:00
Christian Rinderknecht
786b183d40 [WIP]
* 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.)
2020-01-21 18:35:36 +01:00
Lesenechal Remi
57aeb4e931 detect self_address when not at top level 2020-01-21 13:26:38 +01:00
Christian Rinderknecht
8384e3d1f7 [WIP] Refactoring of front-end. 2020-01-20 10:57:07 +01:00
Lesenechal Remi
fcb1c4ab77 add --contatenate option to cover.sh script 2020-01-09 22:19:40 +01:00
Christian Rinderknecht
dad9b0f816 Refactoring of the AST and simplfier of PascaLIGO.
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)")
2020-01-09 17:26:07 +01:00
Christian Rinderknecht
6a1939553e Added --messages. 2020-01-07 22:26:47 +00:00
Lesenechal Remi
a0a8f114c0 replaces remove_from by take which does not raise any exceptions 2020-01-06 19:24:41 +01:00
Lesenechal Remi
7e05b7d276 now removes the entry-point declaration from the program before aggregation 2020-01-06 18:41:53 +01:00
Christian Rinderknecht
345ffe22e4 Improved formatting of error messages (EOF is handled now). 2020-01-02 15:08:14 +01:00
Christian Rinderknecht
ea4eb76013 I added support for unlexing to CameLIGO. Fixed cover.sh. 2019-12-26 13:23:32 +01: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
Tom Jack
d7bea52d44 Unignore dune-project 2019-12-19 19:53:10 +00:00
Christian Rinderknecht
9512992d2b Generating .msg files and extracting from them LIGO source files. 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
00f2e253f3 Generating .msg files and extracting from them LIGO source files. 2019-12-18 21:21:39 +01:00
Sander
95a7e19be6 Add ReasonLIGO support 2019-12-10 13:47:31 +00:00
Christian Rinderknecht
6cc17f9a3f I rewrote some comments so [dune build @doc] can extract HTML from
module interfaces.

This is meant as an exercise and an example to all team members.

I fixed a minor shadowing issue in [x_list.ml].
2019-12-07 15:09:49 +00:00
Pierre-Emmanuel Wulfman
034c92a64c Use ADT for types and move type to ast_common
and Making name, type_variable, built-in, constructor, label and string uncompatible types in ligo (weird bug with types in ligodity)
2019-12-04 11:40:58 +00:00
Tom Jack
66d2cda107 Mini_c: Inlining optimization 2019-11-27 09:06:31 -06:00
Lesenechal Remi
f27f8c10d1 For collection loop: also capture variable in logical blocks
Also, the iterated element/s are appended tot he list of local declaration
2019-11-21 11:28:32 +01:00
Lesenechal Remi
f7d6a5ea58 allow to catch failwith's in our tests 2019-11-19 15:38:23 +01:00
galfour
ddc4b7b7a5 add anon functions; remove pre-block declarations; update tests 2019-11-18 16:10:48 +01:00
Christian Rinderknecht
759978393a Merge branch 'rinderknecht-dev' into 'dev'
Refactoring of PascaLIGO's front-end

See merge request ligolang/ligo!176
2019-11-06 17:17:02 +00:00