syntax role modifiers - #1835
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1835 +/- ##
========================================
- Coverage 45% 45% -1%
- Complexity 6786 6842 +56
========================================
Files 843 847 +4
Lines 68798 69492 +694
Branches 10029 10152 +123
========================================
+ Hits 31345 31631 +286
- Misses 35064 35423 +359
- Partials 2389 2438 +49 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…d dead commented code
… for all node, adt and some grammar types
|
@rodinaarssen could you have a look at this? especially if you think we need more tests. |
…e exceptional situation that tey would start with layout or end with layout
…and end with empty
rodinaarssen
left a comment
There was a problem hiding this comment.
Nice work!
I have some remarks/questions, primarily for clarification
|
|
||
| AType alub(\asyntaxRoleModifier(SyntaxRole a, \aparameter(x, _)), | ||
| \asyntaxRoleModifier(SyntaxRole b, \aparameter(y, _))) = aadt("Tree",[], dataSyntax()) | ||
| when x != y, {a,b} < {contextFreeSyntax(), lexicalSyntax(), keywordSyntax(), layoutSyntax()}; |
There was a problem hiding this comment.
Are we missing overloads for when x == y, or is that handled elsewhere?
There was a problem hiding this comment.
the default rule for lub(x,x) = x comes into play automatically.
- In this case when
a == bandx == ythat is easy to see. - When
a == bbutx != ywe get the current case - When
a != bbutx == ywe should also get the current case. - When
a != b andx != y` we should also get the current case.
So I'm dropping the x != y condition
| protected Type glbWithNonTerminal(RascalType other) { | ||
| IConstructor otherSym = ((NonTerminalType)other).symbol; | ||
|
|
||
| // TODO: this code does not cater for type parameters! |
|
Interesting bootstrap issue while running CI on this PR: |
Commented out the @bootstrapParser annotation for bootstrapping purposes.
|



This PR implements syntax role modifiers.
SyntaxModifiers.pdf
Note that syntax role modifiers do not introduce the fields of the modified type to the modifier type (yet). That is for another RAP/PR.