Ast-classes#79
Conversation
# Conflicts: # tests/CMakeLists.txt
Codecov Report
@@ Coverage Diff @@
## master #79 +/- ##
==========================================
+ Coverage 52.42% 56.61% +4.19%
==========================================
Files 32 33 +1
Lines 3800 4377 +577
==========================================
+ Hits 1992 2478 +486
- Misses 1808 1899 +91
Continue to review full report at Codecov.
|
|
Do you know that you don't have to close and reopen an PR? Just commit to your branch and it will be automatically added to the PR if it is not closed. |
…d all necessary classes to support the new grammar
Lythenas
left a comment
There was a problem hiding this comment.
I think generally it looks pretty good.
Can you please run the format script (and you should probably install the commit hook to do that automatically).
It may be worth merging some of the nodes. E.g.
VariableDeclarationandLocalVariableDeclarationcan be merged with a bool saying if it is local or not.VariableDeclarationandVariableDeclaratorcan be merged which might make it easier to use.
|
|
…some conditions that should be ensured by the tree sitter grammar into asserts
| // BinaryOperation | ||
| BinaryOperation::BinaryOperation(ts::Node node) : bin_op(node) { | ||
| if (node.type_id() != ts::NODE_BINARY_OPERATION || node.child_count() != 3) { | ||
| assert(node.child_count() == 3); |
There was a problem hiding this comment.
the asserts should be after the if because if we pass in the wrong type of node the exception is more appropriate.
Closes #8