Fix stack overflow with large chained expressions.#49096
Conversation
davidwengier
left a comment
There was a problem hiding this comment.
Nit: no point having the ArrayBuilder passed in now, could just be internal to that method.
|
Hello @CyrusNajmabadi! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
@CyrusNajmabadi this is where knowing the codebase helps. The reason I did the dual-state thing is because you get in a SyntaxNode as the root, which can either, but I didn't know how to go from SyntaxToken to SyntaxNodeOrToken, so I couldn't easily push the top node to the stack, hence the other logic. I tried using the constructor "SyntaxNodeOrToken(SyntaxNode node)", but Intellisense was complaining that its protection level didn't allow me to call it. Now I see that was probably an Intellisense bug. Thanks for finishing this up. There is still another stack recursion bug. It's a bit more complicated, since it involves three methods. At least with it, it's handled and there's a warning at the top instead of the whole IDE crashing. |
There's no intellisense issue there. The constructor isn't publicly accessible. Instead, there is an implicit conversion. It's a way of simulating inheritance with structs. |
No description provided.