Commit Graph

256 Commits

Author SHA1 Message Date
Pierre-Emmanuel Wulfman
9796cd2e8f for loop have a optional step parameter 2020-04-15 17:25:31 +02:00
Sander Spies
3e447c40b7 Merge 2020-04-14 13:11:44 +02:00
Sander Spies
2b82a74d93 Merge 2020-04-14 10:32:12 +02:00
Suzanne Dupéron
22fce03844 Improve a typer print 2020-04-13 23:10:01 +02:00
Christian Rinderknecht
1ccf6f247d Fixed format of syntax error messages. 2020-04-13 16:31:56 +02:00
Sander Spies
d9148699cc Fix contract tests 2020-04-13 13:58:58 +02:00
Sander Spies
6a6c8468a6 Remove annotations from michelson or. 2020-04-13 10:59:36 +02:00
Sander Spies
42b05c0437 Test tuples without annotations. 2020-04-13 10:31:09 +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
Lesenechal Remi
38c99eca53 carthage: add tests for comparable pairs 2020-02-18 12:31:19 +01:00
Lesenechal Remi
39fc076c2b fix regression of comparison of key_hash and add a test for it 2020-02-13 16:44:21 +01:00
Suzanne Dupéron
0113a448de Merge branch 'dev' into 'feature/doc-pascaligo-loop'
# Conflicts:
#   src/passes/operators/operators.ml
2020-02-10 20:51:41 +00:00
Christian Rinderknecht
9b5d63de1f Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht@contracts 2020-02-10 19:33:04 +01:00
Christian Rinderknecht
61832354d9 Merge branch 'dev' of gitlab.com:ligolang/ligo into feature/doc-pascaligo-loop 2020-02-10 19:22:52 +01:00
Lesenechal Remi
8c38352290 ligo interpreter : adding more tests 2020-02-10 12:02:36 +01:00
Lesenechal Remi
69ddce1860 add temporary CLI comand for ligo interpreter tests 2020-02-09 18:22:33 +01:00
Suzanne Dupéron
995ca7e807 Print numeric records as tuples, better typer error messages for records & tuples 2020-02-09 00:31:30 +01:00
Pierre-Emmanuel Wulfman
199e0a3bb2 Print records and variants in lexicographic order 2020-02-09 00:31:30 +01:00
Pierre-Emmanuel Wulfman
ae82144418 removing assign, tuples, sequences, 2020-02-09 00:31:30 +01:00
Christian Rinderknecht
e6dc4371ee Merge branch 'dev' of gitlab.com:ligolang/ligo into feature/doc-pascaligo-loop 2020-02-08 10:16:34 +01:00
Lesenechal Remi
5ef61d3520 add assert primitive for pascaligo 2020-02-07 15:28:46 +01:00
Lesenechal Remi
784c2da81b Remove useless constants:
* C_HASH (removed)
* C_MAP_GET --replaced--> C_MAP_FIND_OPT
* C_MAP_GET_FORCE --replaced--> C_MAP_FIND
2020-02-06 18:08:51 +01:00
Christian Rinderknecht
7a484cb45c Merge branch 'dev' of gitlab.com:ligolang/ligo into feature/doc-pascaligo-loop 2020-02-05 16:29:37 +01:00
Christian Rinderknecht
410bbb0723 Complete rewrite of the documentation. 2020-02-05 16:28:40 +01:00
Sander Spies
0f9b92b83f Oops. 2020-02-04 14:02:57 +01:00
Sander Spies
795f0d4056 ReasonLIGO: missing ')' error message. 2020-02-04 13:31:41 +01:00
Sander Spies
e92d16fd79 Simplify error case. 2020-02-03 14:03:47 +01:00
Sander Spies
bbe80bcbfb Merge. 2020-02-03 14:01:01 +01:00
Sander Spies
98dab8d491 Extra line. 2020-02-03 11:57:37 +01:00
Sander Spies
1146292a76 Argh 2020-02-03 11:26:23 +01:00
Sander Spies
bf985797fb - Don't allow to chain let bindings like: let a = let b = 2.
- Give a proper warning when creating an incorrect let binding.
2020-02-03 10:53:44 +01:00
Sander Spies
952e291066 Typo 2020-02-03 10:06:28 +01:00
Sander Spies
c1f5080b81 Spacing. 2020-02-03 09:30:42 +01:00
Sander Spies
360ee7b45e Wrong extension 2020-02-02 20:07:19 +01:00
Sander Spies
6beccd09a8 Wrong function arguments error message. 2020-02-02 18:08:16 +01:00
Sander Spies
bc9cb36d97 Typo. 2020-01-31 19:31:51 +01:00
Sander Spies
6c3879403b Enable incremental parser by default \o/
Fix test.
2020-01-31 17:45:48 +01:00
Suzanne Dupéron
8eb6472b00 Updated some docs that did not include reasonligo / .religo yet 2020-01-29 18:02:55 +00:00
Christian Rinderknecht
a6bf16cbe2 Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht-dev 2020-01-29 16:49:42 +01:00
Christian Rinderknecht
a29b5acb31 Finished refactoring the front-end. 2020-01-27 17:28:31 +01:00
Suzanne Dupéron
1734d31a41 Merge branch 'dev' of gitlab.com:ligolang/ligo into dev 2020-01-27 15:10:30 +00:00
Christian Rinderknecht
fc3385389b [WIP] Refactoring the front-end. 2020-01-27 16:05:47 +01:00
Christian Rinderknecht
0131b0c23d Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht-dev 2020-01-27 13:00:18 +01:00
Rémi Lesenechal
334deea8ec Merge branch 'feature/fix-compile-storage' into 'dev'
fix bad copy paste ?

See merge request ligolang/ligo!360
2020-01-27 11:38:30 +00:00
Lesenechal Remi
088c5560c4 test for compile-storage 2020-01-27 11:42:32 +01:00
Lesenechal Remi
1a6a682584 fix bad copy paste ? 2020-01-27 11:36:51 +01:00
Christian Rinderknecht
8843a46975 Added missing check for reserved names in CameLIGO.
The calls to the lexer and parser of CameLIGO through the compiler use
now their error messages, like in PascaLIGO.
2020-01-24 15:57:41 +01:00
Christian Rinderknecht
3c9dd93c8b Fixed again priority of "->" vs "*" in type expressions.
Fixed negative tests.
2020-01-24 14:35:15 +01:00
Lesenechal Remi
ba0548d6b8 some list-declarations tests 2020-01-23 22:12:33 +01:00
Lesenechal Remi
fd47f51031 add a new CLI command: list-declarations 2020-01-23 22:12:33 +01:00
Lesenechal Remi
69d125b667 fix evaluate-value and added tests 2020-01-23 14:29:04 +01:00
Suzanne Dupéron
1592404e03 Merge commit '4977c18e' into bugfix/new-typer 2020-01-23 11:56:02 +01:00