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.
Problem: We want to be able to extract document symbols from some
ligo contract that are realised by @haskell-lsp@ client.
Solution: Implement `extractDocumentSymbols` and integrate it with
@haskell-lsp@.
Problem: We want to integrate our lsp client with ligo binary to
be able to typecheck declarations as well as extract their scopes.
Solution: Implement a simple client that calls ligo and some helpers
functions to extract scopes from its output.
Problem: We want to be able to show modal on hovering curson on
some specific declaration.
Solution: Add `hoverDecl` and integrate it with haskell-lsp client.
Problem: We want to be able to parse whole directory for ligo
contracts for testing purposes.
Solution: Add `parseContracts` function that returns `ParsedContract`
data that ignores every file which is not a ligo contract.
Problem: We want to support code folding for functions and types
in our lsp.
Solution: Add `foldingAST` function that produces an additional
list of ranges along with the given monad used in `haskell-lsp`
API to collect ranges that are consequently sent to server.
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.
Problem: Currently we have not integrated our completions with
haskell-lsp server so that we could use this completion from text
editor itself.
Solution: Add the corresponding requests for handling code completion.
Problem: With generated ReasonLIGO grammar we need to develop its
parser as well. With it we also need to restructure AST a bit
and add expressions that are used for ReasonLIGO specifically.
Solution: Add ReasonLIGO parser and some dummy examples of its
usage, adapt AST to it, rename LIGO to AST.
Problem: We need to add stylish config to settle code style for our
project. Makefile to simplify its building. Also we need to check
our project for trailing whitespaces so we need to add the corresponding
script to be used later in CI.
Solution:
Add
- stylish-haskell config
- Makefile
- `check_trailing_whitespace` script
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.