tree-sitter-rescript icon indicating copy to clipboard operation
tree-sitter-rescript copied to clipboard

Top level error for simple binding

Open nojaf opened this issue 11 months ago • 2 comments

When running tree-sitter parse A.res with let a = () => 5 I got:

(source_file [0, 0] - [0, 15]
  (ERROR [0, 0] - [0, 15]
    (let_binding [0, 4] - [0, 15]
      pattern: (value_identifier [0, 4] - [0, 5])
      body: (function [0, 8] - [0, 15]
        parameters: (formal_parameters [0, 8] - [0, 10])
        body: (number [0, 14] - [0, 15])))))
A.res      0.93 ms          16 bytes/ms (ERROR [0, 0] - [0, 15])

Is that first error node a bug?

nojaf avatar Jan 09 '25 09:01 nojaf

It works on my side, did you use the tree-sitter binary from node_modules ?

WhyThat avatar Jan 22 '25 13:01 WhyThat

Ah, no I did a a global install of the latest tree-sitter. Could that be it?

nojaf avatar Jan 22 '25 14:01 nojaf