Commit Graph

199 Commits

Author SHA1 Message Date
Christian Rinderknecht
1ccf6f247d Fixed format of syntax error messages. 2020-04-13 16:31:56 +02:00
Christian Rinderknecht
b23b2d1dbb Plugged the preprocessor into the compiler's CLI. 2020-04-12 15:26:47 +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
Lesenechal Remi
f9d1928d8e michelson_or tests and changelog 2020-04-07 21:38:12 +02:00
Pierre-Emmanuel Wulfman
79540f9a40 ediv implemented and tested; parser gives error 2020-04-06 18:23:26 +02:00
Tom Jack
6fed8998bb Somewhat better PP for ast_core and mini_c 2020-04-01 14:32:52 -05:00
Pierre-Emmanuel Wulfman
aac7dd3462 review 1 2020-03-30 17:56:17 +02:00
Pierre-Emmanuel Wulfman
6a9547e910 add type map_or_big_map to solve issue of typing big_map_empty from map_add 2020-03-30 17:55:02 +02:00
Pierre-Emmanuel Wulfman
a39c900b72 remove set and list 2020-03-30 17:55:00 +02:00
Pierre-Emmanuel Wulfman
d91753e493 remove case e_sequance (e_assing, expr) 2020-03-30 14:40:28 +02:00
Pierre-Emmanuel Wulfman
4003aa4e06 add for, for_each, while construct in ast_imperatve;\n Move the treatment of loops and handling of the assignment in imperative_to_sugar 2020-03-27 16:52:44 +01:00
Sander
91a6affdad Merge branch 'enfore_not_allowing_big_maps' into 'dev'
Give an error when nesting a big_map inside another big_map

See merge request ligolang/ligo!518
2020-03-26 10:39:18 +00:00
Pierre-Emmanuel Wulfman
9b192d8ba2 done 2020-03-25 16:23:56 +01:00
Sander Spies
d059cf991b Give an error when nesting a big_map inside another big_map 2020-03-24 13:58:18 +01:00
Pierre-Emmanuel Wulfman
6cafb4026b adding E_sequence in sugar 2020-03-18 18:13:02 +01:00
Pierre-Emmanuel Wulfman
5a4c0b32fb rewrite test suite to compare value from ast_imperative instead of ast_core; includes uncompiler fo stage 4 and 6 2020-03-18 16:00:34 +01:00
Pierre-Emmanuel Wulfman
6dd7afbeb1 change passes name concrete_to_imperative, imperative_to_sugar, sugar_to_core 2020-03-18 16:00:34 +01:00
Pierre-Emmanuel Wulfman
8b3877a92c rename AST to imperative, sugar and core. Factor code in compile 2020-03-18 16:00:34 +01:00
Pierre-Emmanuel Wulfman
2abd737ed3 compiling 2020-03-18 16:00:34 +01:00
Lesenechal Remi
97a85766d3 add a flag to disable michelson typechecking in compile-contract 2020-03-16 12:19:23 +01:00
Pierre-Emmanuel Wulfman
8a0e1dfea4 dune promote 2020-03-12 18:50:42 +01:00
Lesenechal Remi
3a80fadcc8 rewrite interpreter recursion within the initial formalism. 2020-03-12 18:16:56 +01:00
Pierre-Emmanuel Wulfman
660dcbb79f review 3 2020-03-12 16:05:17 +01:00
Pierre-Emmanuel Wulfman
a5f44d3e88 clean-up junk 2020-03-12 16:05:17 +01:00
Pierre-Emmanuel Wulfman
27f583266e test for tail recursion 2020-03-12 16:05:17 +01:00
Pierre-Emmanuel Wulfman
c46002b160 modifying doc and test for loops (Cameligo and pascaligo) 2020-03-12 16:05:17 +01:00
Pierre-Emmanuel Wulfman
b15d9a5123 compiling Pascaligo 2020-03-12 16:05:17 +01:00
Lesenechal Remi
66aca916bf mapping over type_operator types is useless 2020-03-09 18:29:07 +01:00
Lesenechal Remi
503d8f771e add tests for sum type names limit length 2020-03-09 18:29:07 +01:00
Lesenechal Remi
25f004844a self: now reject capitalized entrypoint annotation 2020-03-09 11:23:08 +01:00
Lesenechal Remi
b7c08b78d5 self operator now takes an entrypoint annotation as parameter 2020-03-09 11:23:08 +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
Christian Rinderknecht
8b2a182c6a Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht@contracts 2020-03-04 15:59:47 +01:00
Christian Rinderknecht
bd48a56a24 Forgot to add to the previous commit. 2020-03-04 15:36:33 +01:00
Christian Rinderknecht
d43209f1a1 Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht@contracts 2020-03-04 15:26:43 +01:00
Pierre-Emmanuel Wulfman
b7e65764dd dune promote 2020-03-04 10:35:34 +01:00
Pierre-Emmanuel Wulfman
c23827e8de new negative test 2020-03-04 10:35:34 +01:00
Pierre-Emmanuel Wulfman
dfb1e1ebef add negative test 2020-03-04 10:35:34 +01:00
Pierre-Emmanuel Wulfman
a19e2ceb3b adding negative test 2020-03-04 10:35:34 +01:00
Lesenechal Remi
cf383fe327 more tests 2020-03-03 13:46:11 +01:00
Lesenechal Remi
9a30eb67c1 create_contract: add some tests 2020-03-03 13:46:11 +01:00
Christian Rinderknecht
00e6959503 Refactoring of the test contracts. 2020-03-02 18:01:56 +01:00
Christian Rinderknecht
a9214f864d Reviewing again the PascaLIGO contracts. 2020-02-27 19:09:14 +01:00
Lesenechal Remi
a08adbd085 typer: checks for constructor redundancy 2020-02-26 18:54:16 +01:00
Tom Jack
4b9e175063 Examples: don't use SOURCE 2020-02-20 12:18:57 -06:00
Rémi Lesenechal
e8129c5be3 Merge branch 'feature/variable-in-dry-run' into 'dev'
Allow using top level variables defined in source code in dry-run PARAMETER and STORAGE

See merge request ligolang/ligo!436
2020-02-19 20:41:37 +00:00
Lesenechal Remi
44ff5d580d Allow using top level variables defined in source code in dry-run PARAMETER and STORAGE 2020-02-19 16:10:50 +01:00
Pierre-Emmanuel Wulfman
eee6dbaeb2 make while_loop, for_int and for_collect more similar 2020-02-19 14:41:16 +01:00