Allowing comments to be in statemenet blocks#5
Conversation
|
I think this also includes comments from modules when |
|
You might be right. I will refactor the tests to validate the ast not just that the parse succeeded. |
|
I think that I have confirmed that the comments are not included when here are the arpeggio token trees for each parse result The comment is only present in the one that has I also experimented a bit with validating the parsed tree in the unit tests, but the tree is very deep, especially when parsing numbers, so I dont think validating the entire tree is desirable as it will create really noisy tests that need to be adjusted whenever any part of the parser changes. I could instead validate all the tokens that were parsed, without their parent nodes. otherwise we get something very large and unweildly like this: What were some of the decisions made when writing these tests cases originally as to what should vs should not be tested in each module? |
This PR allows for comments to exist within module statement blocks when the parse is configured with
include_comments=TrueIt feels like I kinda hacked in the second parser into the testcase. I wanted to avoid refactoring the harness entirely for such a small change.