Some additional fine-tuning of annotations, fix#16
Some additional fine-tuning of annotations, fix#16smola merged 1 commit intobblfsh:masterfrom juanjux:complete_roles
Conversation
juanjux
commented
May 29, 2017
- Improved annotations for "If" tests, interpolated strings, and "if" and "for" parts of comprehensions.
- Updated the list of missing UAST nodes and the PRs
- Fixed an old reference to the previous SDK API (ASTParserBuilder -> UASTParserBuilder).
- GoFmt.
| // The current mapping is: | ||
| // - left: BinaryExpressionLeft | ||
| // - Compare.ops: BinaryExpressionOp | ||
| // - Compare.comparators: BinaryExpressionRight |
There was a problem hiding this comment.
I wonder if we need these Binary* roles at all (just thinking aloud, not related specifically to this PR). Maybe annotating operators and operands is enough and is more general (no need to make a special case for binary operators, even if they should work as well for binary operators).
There was a problem hiding this comment.
Mmm it's pretty common to call left and right the elements of a binary expression (just like lvalue and rvalue on assignments), they could be inferred by the order or called first/second.
Your tough about generalizing UnaryExpressions, BinaryExpressions, etc to NExpressions or something like that makes a lot of sense.
There was a problem hiding this comment.
Yes, they're usually called LHS and RHS. Still that info could be implicit, not explicit, without loss of semantic information and reducing Roles pollution.
- Synthetic token rules for operators - Escaped % synthetictoken do it doesnt intefere with sprintf - More synthetic tokens for operators - Updated integration tests - Added missing UnaryOp tokens - Readded the aditional synthetic tokens for all operators - Use errors.new - Add a newline above the external imports - List of missing annotation, fixed a couple - Updated SDK. Added list of missing annotations. Fixed a couple things. - Added roles for the internal loops and tests of comprehensions - Added roles for the IfCondition children, imperfect until the SDK gets some list mixing features - Added roles for the Comprehension.Condition children, imperfect until the SDK gets some list mixing features - Added roles for formattedvalue (expression currently) and a fstring test - comments - More integration tests for fstrings - Fixed old reference to ASTParserBuilder - Ran GoFmt - Fix license and download links - Removed some leftover tests prints - Import fixes