Use Lark with its cache feature, instead of creating a standalone parser#53
Conversation
aoskotsky-amplify
left a comment
There was a problem hiding this comment.
Hey, thanks a lot for this PR! This cleans it up a lot.
I noticed tox was failing so committed some lint fixes. I left a couple of questions in the comments. Let me know what you think and we can merge this.
| # This means that all blocks must end in a new line even if the file ends | ||
| # Append a new line as a temporary fix | ||
| return hcl2.parse(text + "\n") | ||
| return hcl2.parse(text + "\n") # type: ignore |
There was a problem hiding this comment.
mypy was complaining that parse returns a Tree instead of a Dict. We can leave the ignore here but was curious why it does that.
|
From dev-ops perspective, it would be great if See also #64 |
We added a comment with the explanation
The behavior and performance are the same, but the code is much shorter.