-
-
Notifications
You must be signed in to change notification settings - Fork 88
Add "branch"
scope type
#1149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "branch"
scope type
#1149
Conversation
78fa594
to
d6fe259
Compare
252ca38
to
bbc1ca4
Compare
a3e4576
to
90619bc
Compare
7350720
to
adf7c5e
Compare
adf7c5e
to
7ba66c5
Compare
Closing until someone has bandwidth to finish this PR |
After discussion in meet-up: Just kidding; let's get this thing in for the languages that exist here. more useful to at least have it functional in some places |
7f8ad4c
to
20f4c8b
Compare
We should also test:
|
marks: {} | ||
finalState: | ||
documentContents: |- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a bit weird for branch
to work on the try
block itself 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm not entirely sure what the use case for that is tbh 😅, but seemed consistent, and maybe someone would want to use it with the copy
action?
Unfortunately that is blocked on #1201 😕 |
Ah, I was afraid as such. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the implicit "this" change got cherry-picked into this branch for some reason, but otherwise LGTM.
I presume it should be trivial to reuse the if/else matchers for Java and C++ like we did for Rust, and I hope the same for try/catch, so might be worth doing it here anyway.
@@ -46,6 +46,7 @@ | |||
"selector": "selector", | |||
"state": "statement", | |||
"string": "string", | |||
"branch": "branch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: any reason this is listed in this order in particular?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. I should prob file a follow-up to alphabetise; didn't want to mess with the diff
Strange. That's already merged into main anyway, but looks like the parentage is strange here; I'll have a look
Unfortunately not 😕. Java, C#, and C++ don't have a special node for else clauses, so the logic gets more complicated. Should be doable, but not just a quick afterthought like one would hope. I'd be inclined to leave for follow-up work |
397d6ab
to
643090e
Compare
"branch"
scope type #1173Checklist
Co-authored-by: Michael Doronin warrior2031@mail.ru