Commit Graph

332 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
942000065b Weakly-typed creation of ADT elements 2020-06-24 02:07:02 +01: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
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