Skip to content
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

bug: parser stuck in infinite loop with multiple open clauses #281

Closed
2 tasks done
WesleyYue opened this issue Mar 3, 2024 · 3 comments · Fixed by #303
Closed
2 tasks done

bug: parser stuck in infinite loop with multiple open clauses #281

WesleyYue opened this issue Mar 3, 2024 · 3 comments · Fixed by #303
Labels

Comments

@WesleyYue
Copy link

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-typescript

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

Parsing the following code hangs forever on v0.20.5

try {
  console.log("foo");
} catch (err) {
  if (true) {
    console.log("bar");
  } else {
    throw new MyError(a, b

Steps To Reproduce/Bad Parse Tree

No parse tree. Hangs forever.

Expected Behavior/Parse Tree

Expect to not hang :)

Repro

try {
  console.log("foo");
} catch (err) {
  if (true) {
    console.log("bar");
  } else {
    throw new MyError(a, b
@WesleyYue WesleyYue added the bug label Mar 3, 2024
@wentinghome
Copy link

I run into the same problem , any luck for a fix @WesleyYue ?

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-typescript

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

Parsing the following code hangs forever on v0.20.5

try {
  console.log("foo");
} catch (err) {
  if (true) {
    console.log("bar");
  } else {
    throw new MyError(a, b

Steps To Reproduce/Bad Parse Tree

No parse tree. Hangs forever.

Expected Behavior/Parse Tree

Expect to not hang :)

Repro

try {
  console.log("foo");
} catch (err) {
  if (true) {
    console.log("bar");
  } else {
    throw new MyError(a, b

@amaanq amaanq mentioned this issue Jul 6, 2024
@wentinghome
Copy link

wentinghome commented Jul 6, 2024 via email

@amaanq
Copy link
Member

amaanq commented Jul 6, 2024

np, sorry about forgetting to update this w/ the js changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants