-
-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Description
This is something I noticed while testing the fix for #93.
The following code is parsed correctly by tree-sitter-javascript parser but incorrectly by tree-sitter-typescript:
function f()
{}tree-sitter-typescript sees a function_signature followed by a statement_block:
(program [0, 0] - [2, 0]
(function_signature [0, 0] - [0, 12]
name: (identifier [0, 9] - [0, 10])
parameters: (formal_parameters [0, 10] - [0, 12]))
(statement_block [1, 0] - [1, 2]))
However, the tree-sitter-javascript implementation works fine and gives us a single function_declaration:
(program [0, 0] - [2, 0]
(function_declaration [0, 0] - [1, 2]
name: (identifier [0, 9] - [0, 10])
parameters: (formal_parameters [0, 10] - [0, 12])
body: (statement_block [1, 0] - [1, 2])))
Metadata
Metadata
Assignees
Labels
No labels