57 Commits

Author SHA1 Message Date
Kirill Andreev
ba66f6e8e4
Make extension-aware parser entrypoint 2020-08-14 14:54:04 +04:00
Anton Myasnikov
f1938eb2af
Hotfix: add missing Scoped instances 2020-08-12 14:28:51 +03:00
Anton Myasnikov
a1a846b554
[LIGO-25] Add ReasonLIGO parser
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.
2020-08-11 13:33:26 +03:00
Kirill Andreev
2a8cda17ce
Add type/doc capture 2020-08-11 12:32:55 +04:00
Kirill Andreev
38c32f01d4
Remove most warnings and renudant line in AST.Parser 2020-08-11 12:32:55 +04:00
Kirill Andreev
107018e6f3
Add basic code completion mechanism 2020-08-11 12:32:54 +04:00
Kirill Andreev
08a0eb55d1
Fix AST.Scope 2020-08-11 12:32:54 +04:00
Kirill Andreev
31274e1507
Tie all up 2020-08-11 12:32:54 +04:00
Kirill Andreev
9f29dab195
Fix letrec partially 2020-08-11 12:32:53 +04:00
Kirill Andreev
6bd5d9ef84
Update AST.Scope to new framework 2020-08-11 12:32:53 +04:00
Kirill Andreev
226b7264aa
Restore AST.Scope instances and part of the machinery 2020-08-11 12:32:53 +04:00
Kirill Andreev
b5e5bc25a1
[WIP] Conversion to descent-based parser 2020-08-11 12:32:52 +04:00
Kirill Andreev
58e5128142
Fix dying on broken code and handle errors in Main.hs 2020-08-11 12:32:10 +04:00
Kirill Andreev
508b111374
Fix blocks getting invalid ranges 2020-08-11 12:32:09 +04:00
Kirill Andreev
20014a7926
Remove warnings, refactor FullEnv 2020-08-11 12:32:09 +04:00
Kirill Andreev
e5ec32f46a
Fix letrec behaviour 2020-08-11 12:32:08 +04:00
Kirill Andreev
c26bc044ee
Separate the namespaces for search 2020-08-11 12:32:08 +04:00
Kirill Andreev
ba3c0a76d9
Fix function stealing 'goto def's 2020-08-11 12:32:07 +04:00
Kirill Andreev
65fc5bec75
Separate env-tree construction and usage 2020-08-11 12:32:06 +04:00
Kirill Andreev
b35a28853b
Add ability to recursively parse #included files 2020-08-11 12:32:06 +04:00
Kirill Andreev
583d7f8997
Clean the comments 2020-08-11 12:32:05 +04:00
Kirill Andreev
03b89bc5b7
Rewrite scope loader 2020-08-11 12:32:05 +04:00
Kirill Andreev
8d61a36918
[WIP] Implement a loader of Env from a ScopeTree 2020-08-11 12:32:05 +04:00
Kirill Andreev
9f124bf5af
Implement def/impl/type search 2020-08-11 12:32:04 +04:00
Kirill Andreev
9cf2e0cf97
Use Data.Sum instead of manual Union 2020-08-11 12:32:04 +04:00
Kirill Andreev
44defb2114
Remove Data.Fix, make recursion manually 2020-08-11 12:32:03 +04:00
Kirill Andreev
19f05f5afc
Rename HasComments to Comment; remove *.cabal 2020-08-11 12:32:03 +04:00
Kirill Andreev
e701e196fe
Improve documentation 2020-08-11 12:32:03 +04:00
Kirill Andreev
9d81ecf353
Silence warnings 2020-08-11 12:32:02 +04:00
Kirill Andreev
1f7af3c8cb
Make infoOf always return an info 2020-08-11 12:32:02 +04:00
Kirill Andreev
f3fbfb49a1
Add documentation 2020-08-11 12:32:01 +04:00
Kirill Andreev
923a5bb9fe
Add documentation 2020-08-11 12:32:00 +04:00
Kirill Andreev
d380e46737
Convert to monotyped AST 2020-08-11 12:32:00 +04:00
Kirill Andreev
113a2425a4
Remove ScopeHelpers.hs 2020-08-11 12:31:59 +04:00
Kirill Andreev
5c643a3b63
TMP 2020-08-11 12:31:59 +04:00
Kirill Andreev
67de82edec
[LIGO-6] Implement fallback scope system 2020-08-11 12:31:58 +04:00
Kirill Andreev
1536590edb
TMP 2020-08-11 12:31:58 +04:00
Kirill Andreev
c8b4c2bd35
Fix comment )-truncation 2020-08-11 12:31:57 +04:00
Kirill Andreev
e1a3903e18
Limit exports of Parser 2020-08-11 12:31:57 +04:00
Kirill Andreev
020b3ba334
Improve pretty-printer 2020-08-11 12:31:57 +04:00
Kirill Andreev
19e1018620
Add autocollector for comments 2020-08-11 12:31:56 +04:00
Kirill Andreev
916d9897bd
Simplifying parser 2020-08-11 12:31:56 +04:00
Kirill Andreev
6dc1eb23cd
Remove excess params of Parser.{many,some} 2020-08-11 12:31:55 +04:00
Kirill Andreev
b62cd58add
Add some more documentation 2020-08-11 12:31:55 +04:00
Kirill Andreev
eace901195
Remove debug print, document Parser.hs 2020-08-11 12:31:54 +04:00
Kirill Andreev
e6299a50ff
Make parser recognise all src/tests/contracts 2020-08-11 12:31:54 +04:00
Kirill Andreev
b4e6231340
Add [Big]Map literal/removal/projection parser 2020-08-11 12:31:54 +04:00
Kirill Andreev
2f269e32ea
Add attribute parser 2020-08-11 12:31:53 +04:00
Kirill Andreev
d928aaa39c
Add lists, if, assignments, string, tez parsers 2020-08-11 12:31:53 +04:00
Kirill Andreev
6e862bf5b9
Untie AST builder from comment accumulation 2020-08-11 12:31:53 +04:00