Commit Graph

12 Commits

Author SHA1 Message Date
417b427f6d
Fix tree-sitter generation with make 2020-09-17 18:24:35 +03:00
Kirill Kuvshinov
c44a35d4d1
[LIGO-47] PascaLIGO: Move block out of case_block alternatives
Problem: In multisig.ligo:48, the case alternative block is
interpreted as empty, while it is not. This happens because
PascaLIGO parser expects to find `fields "statements"` inside
a `case_block`. In practice, if a `case_block` contains a `block`,
statements are deeper in the hierarchy, and get ignored.

Solution: Move "block" option out of the "case_block"
(to _if_clause).
2020-09-15 11:25:21 +03:00
Kirill Kuvshinov
04724a1db2
[LIGO-47] Allow let .. in in lambda body
Problem: In multisig.mligo, else clause on line 36 ends on line 55,
while it should end on line 80. This happens because of incorrect
lambda parsing on lines 42-43. In particular, `let valid, keys = vk`
in lambda body gets parsed as a
`tuple (fun_app "let" "valid") (binary_op "=" "keys" "vk")`, and `in`
is considered as a part of the outer `let`.

Solution: Allow `_program` instead of `_expr` as the lambda body.
2020-09-15 11:22:15 +03:00
Kirill Andreev
da6ca97a9d
Fix 'field name not found' for reasonligo 2020-08-24 20:05:24 +04:00
Kirill Andreev
5533b07270
Fix pattern defs for pascaligo 2020-08-24 14:17:53 +04:00
Anton Myasnikov
3037be689b
[LIGO-27] Fix parameters for lambdas and restructure grammar
Problem: It happens that "go to definition" fails with lambda
parameters meaning that we do not create proper AST for it.
Also we need to restructure grammar so that we can support it in
the future.

Solution: Restructure grammar to use "param_decl" and ensure that
we use proper fields for parser resolution.
2020-08-23 22:05:27 +03:00
Kirill Andreev
1c684a791c
Fix camligo not registering fun/lam args 2020-08-21 18:24:06 +04:00
Kirill Andreev
6e2f592094
[LIGO-17] Implementing CAMLligo dialect 2020-08-18 21:56:33 +04:00
Kirill Andreev
1a948bcae7
Extension and grammar 2020-08-17 16:29:42 +04:00
Kirill Andreev
28e16ca068
Make grammar parse everything except inline M. 2020-08-13 16:13:48 +04:00
Kirill Andreev
78c408b76a
Untangle existing code for grammar 2020-08-13 16:13:42 +04:00
Anton Myasnikov
99321a59bb
[LIGO-25] Add grammar for ReasonLIGO and move it to squirrel
Problem: Before making parser for ReasonLIGO we need to construct
its grammar so that we can collect *all* errors and simplify our
further work with AST. Also since we use those grammars in squirrel
it would be conscise to use them from the project directory directly.

Solution: Add grammar for ReasonLIGO and move grammar to squirrel.
2020-08-11 13:30:46 +03:00