Commit Graph

320 Commits

Author SHA1 Message Date
Christian Rinderknecht
d1b7388550 Refactoring of the dune files, minimised dependencies. 2020-06-30 14:34:15 +02: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
4a860830b9 bugfix: replace very bogus implementation of add_list with a clean one 2020-05-29 21:23:11 +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
Christian Rinderknecht
1c9240703c Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht@fix_endif 2020-05-15 21:24:57 +02:00
Christian Rinderknecht
34b9ee14da [Bug fix] Case #include followed by newline or eof.
I added cases for scanning eof (followed by a rollback).
2020-05-15 21:23:49 +02:00
Christian Rinderknecht
b44da17ee0 [Bug] I forgot the check whether to perform #include or not. 2020-05-15 18:31:01 +02:00
Lesenechal Remi
3333742037 Converters for michelson types 2020-05-02 15:30:10 +02:00
Suzanne Dupéron
94b9404d1b Union-Find: function to extract the list of partitions 2020-04-29 21:33:07 +01:00
Suzanne Dupéron
8e9ee21cd4 Fix Not_found bug (remove redeclaration of the exception) 2020-04-29 21:33:07 +01:00
Suzanne Dupéron
0580f21896 moved core and solver types to the AST, removed functor hell (Map, Set, UnionFind) 2020-04-29 21:32:50 +01: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
ce5464f9af The preprocessor library depends now on the kinds of comments
instead of a closed set of languages. I also removed the offsets:
I simply use the current region to determine whether the
preprocessing directie starts at the beginning of a line. I also
removed scanning line indicators, to make the lexer simpler.
2020-04-24 20:54:13 +02:00
Christian Rinderknecht
f27bbb317e Bug fix: the environment has to be threaded through #include 2020-04-16 16:56:11 +02:00
Suzanne Dupéron
0d77cbe1c4 Gitignore ….install in vendors/Preprocessor 2020-04-13 23:16:17 +02:00
Suzanne Dupéron
3171001395 Added a polymorphic version of one of the UnionFind implementations 2020-04-13 23:10:01 +02:00
Suzanne Dupéron
4a7edafcb7 Dunification of the Red-Black_Trees library 2020-04-13 19:23:12 +02:00
Suzanne Dupéron
0704676724 Imported Christian Rinderknecht's polymorphic Red-Black_Trees library from commit 98b1131281 2020-04-13 19:23:12 +02:00
Suzanne Dupéron
2cbc8bbf0c Revert "Revert "Merge branch 'feature/adt-generator-poly-3' into 'dev'""
This reverts commit 8b83e375bd.
2020-04-13 19:23:12 +02:00
Christian Rinderknecht
6c02482bf9 Fixed the #include directive. 2020-04-09 18:41:55 +02:00
Christian Rinderknecht
3ed303f60d In EvalOpt modules, the CLI input ["-"] is becomes now [None],
like the absence of an input filename. (This simplifies all the
clients codes.) Fixed the dune file for the preprocessor. Fixed
the build of PreprocMain.exe and PreprocMain.byte. Restricted
preprocessing errors [Preproc.Newline_in_string] and
[Preproc.Open_string] to the argument of the #include
directive (instead of general strings: this is for the LIGO lexer
to report the error). I removed the error [Preproc.Open_comment]
as this is for the LIGO lexer to report. The preprocessor scanner
[Preproc.lex] does not take a parameter [is_file:bool] now: the
source file (if any) is determined from the lexing
buffer. Accordingly, the field [is_file] of the state of the
preprocessing lexer has been removed: the lexing buffer becomes
now the reference for the input source (bug fix and interface
improvement). Fixed the comments of the test contract
pledge.religo. I removed the data constructor [Lexer.Stdin], as
redundant with [Lexer.Channel].
2020-04-09 16:18:26 +02:00
Christian Rinderknecht
46eecb4027 Marked the errors that should be skipped (because catched by the
LIGO lexer later). Added field [is_file] to the state of the
lexer to know if the input is a file or not (insert or not a
first line directive). Fixed ReasonLIGO comments in
entrypoints-contracts.md and website2.religo. WIP on the LIGO
lexer to properly handle comments for all the syntaxes.
2020-04-08 20:24:34 +02: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
Christian Rinderknecht
1941f9ae4b Shared more code in ParserUnit.ml
Rewrite of the integration of the preprocessor.
Compiles bt DOES NOT PASS THE CI.
2020-04-03 19:08:14 +02:00
Christian Rinderknecht
6c1a1f91e2 Removed error "Invalid directive" as PascaLIGO has the operator #. 2020-04-03 19:06:35 +02:00
Christian Rinderknecht
f5e0dad979 Added # line directive at the start to recover the file name. Continued integration. 2020-04-01 19:22:46 +02:00
Christian Rinderknecht
968e73b342 Integrated the library for preprocessing.
The build with Makefile works. Dune build to be tested.
2020-03-31 19:44:10 +02:00
Christian Rinderknecht
ebff258882 The emitted line directives now have the exact same contents as with
cpp. A line made of blanks is now correctly copied out (instead of
single newline).
2020-03-27 19:30:39 +01:00
Christian Rinderknecht
b5a3fb9367 The directive #include is now recursive. 2020-03-26 19:32:48 +01:00
Christian Rinderknecht
ca48e152a0 I removed exceptions for error reporting through the
interfaces ([Stdlib.result] instead).

I added --verbose=preproc to print the preprocessed text until
the error.

Fixed a bug: some whitespace in skip mode was printed out.
2020-03-26 16:51:08 +01:00
Christian Rinderknecht
b24f1f6b1d Added support for -I CLI option (same behaviour as CPP).
Comments are now recognised in accordance with the file extension.
2020-03-25 18:52:23 +01:00
Christian Rinderknecht
ab79fe4eda Added some interfaces and removed submodules [Error]. 2020-03-24 21:05:39 +01:00
Christian Rinderknecht
9b6b13cda3 Fixed dune file. 2020-03-24 18:52:00 +01:00
Christian Rinderknecht
8ce6d00d06 Remove redundant \n in error messages. 2020-03-24 18:43:15 +01:00
Christian Rinderknecht
9c9321029a First working version. 2020-03-24 17:48:01 +01:00
Christian Rinderknecht
37faf9022e [WIP] Does not compile yet. 2020-03-23 19:43:06 +01:00
Pierre-Emmanuel Wulfman
e7c71ae4cc passing test for Cameligo 2020-03-12 16:05:17 +01: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
Lesenechal Remi
9de04123d3 --balance option and updated tests 2020-03-05 20:52:47 +01:00
Tom Jack
d10b95357f Detect gas exhaustion while typechecking 2020-03-05 10:43:40 -06:00
Tom Jack
fe84d21208 Hack: don't log types in Michelson typecheck_code 2020-03-05 10:43:40 -06:00
Tom Jack
1e77bd82c8 Revert "Use unlimited gas for typechecking contract"
This reverts commit 97aad1c5ea65375d464a278495cb3dc696c28c70.
2020-03-05 10:43:40 -06:00
Tom Jack
acf3f9284e More gas for typechecking etc 2020-03-05 15:38:08 +00:00
Tom Jack
23353b0e27 Clarify internal sender/source options 2020-02-20 12:17:31 -06:00
Pierre-Emmanuel Wulfman
9de45285b2 remove Var.show 2020-02-18 14:19:11 +01:00
Lesenechal Remi
e63f2407c2 carthage update:
* update dune & opam files
* update modules in source
2020-02-17 13:10:51 +01:00
Lesenechal Remi
395b4890eb update the dune.inc magic trick 2020-02-17 13:10:51 +01:00
Lesenechal Remi
5bb8c28959 carthage: update tezos copy/pasted files 2020-02-17 13:10:51 +01:00
Rémi Lesenechal
8b83e375bd Revert "Merge branch 'feature/adt-generator-poly-3' into 'dev'"
This reverts merge request !403
2020-02-11 10:45:08 +00:00