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: Inconsistent results between WASM and local parsing #280

Open
2 tasks done
konsalex opened this issue Feb 27, 2024 · 0 comments
Open
2 tasks done

bug: Inconsistent results between WASM and local parsing #280

konsalex opened this issue Feb 27, 2024 · 0 comments
Labels

Comments

@konsalex
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)

tree-sitter 0.20.9

Describe the bug

Currently there is a mismatch between the local parsing using tree-sitter-typescript and using the online playground.

File I am testing can be found here.

The local version give me an error, with an exit code 1, while online playground works as expected.

(ERROR [0, 0] - [2658, 0]
  (comment [0, 0] - [6, 3])
  (import_statement [7, 0] - [7, 95]
    (import_clause [7, 7] - [7, 67]
      (named_imports [7, 7] - [7, 67]
        (import_specifier [7, 8] - [7, 15]
          name: (identifier [7, 8] - [7, 15]))
        (import_specifier [7, 17] - [7, 31]
          name: (identifier [7, 17] - [7, 31]))
        (import_specifier [7, 33] - [7, 38]
.......

Steps To Reproduce/Bad Parse Tree

  1. Parse this file locally with tree-sitter parse '....angular/packages/core/test/acceptance/integration_spec.ts'
  2. Parse this file inside the playground

Expected Behavior/Parse Tree

Get parsed like in the playground

Repro

// Cannot add one: `There was an error creating your issue: body is too long (maximum is 65536 characters).`

Just use the links added above
@konsalex konsalex added the bug label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant