[X] Have you used the debugging guide to try to resolve the issue?
[X] Have you checked our FAQs to make sure your question isn't answered there?
[X] Have you checked to make sure your issue does not already exist?
[X] Have you checked you are on the latest release of Pulsar?
What happened?
Because of the strange way that tree-sitter-php structures its tree, I use an unusual method to determine which ranges of a .php file are HTML and which are PHP. It tries to match balanced pairs of <?php (and equivalent) and ?>.
But I did something silly: when it finds an unbalanced token, it throws an exception! This exception goes uncaught and ends up preventing any editing attempts by the user.
Instead, it should be more tolerant of errors, and do something logical, even if it's not going to be correct. (The code is syntactically invalid in this scenario, so there is no such thing as “correct”; favor the solution that keeps the editor running.)
Pulsar version
1.118
Which OS does this happen on?
❓ Other(Please specify in the OS details field below)
OS details
(any OS)
Which CPU architecture are you running this on?
None
What steps are needed to reproduce this?
I was able to reproduce this issue by following the instructions in this issue comment.
Thanks in advance for your bug report!
What happened?
Because of the strange way that
tree-sitter-php
structures its tree, I use an unusual method to determine which ranges of a.php
file are HTML and which are PHP. It tries to match balanced pairs of<?php
(and equivalent) and?>
.But I did something silly: when it finds an unbalanced token, it throws an exception! This exception goes uncaught and ends up preventing any editing attempts by the user.
Instead, it should be more tolerant of errors, and do something logical, even if it's not going to be correct. (The code is syntactically invalid in this scenario, so there is no such thing as “correct”; favor the solution that keeps the editor running.)
Pulsar version
1.118
Which OS does this happen on?
❓ Other(Please specify in the OS details field below)
OS details
(any OS)
Which CPU architecture are you running this on?
None
What steps are needed to reproduce this?
I was able to reproduce this issue by following the instructions in this issue comment.
Additional Information:
No response