tree-sitter-javascript
tree-sitter-javascript copied to clipboard
Javascript grammar for tree-sitter
I suspect that the _assignment_expression_ in following piece of code is parsed incorrectly: ```javascript let o = { x: "s", y: 0 }; ({x: v, y: w} = o); ```...
When parsing a `for`, the condition is parsed such that the `for` keyword and the parentheses are included directly into the parent `for_in_statement` node. For example, this input: ``` for...
The following piece of code is valid but it is parsed incorrectly: ```javascript foo`\x` ``` Here's a [link to the TypeScript Playground](https://www.typescriptlang.org/play/?filetype=js#code/MYewdgzgLgBAZiEMC8MAUBDATgcwgShQD4ZRIQAbAUwDoKQdNcCBuAKARAAMAdADy5A) showing that the snippet above is valid JavaScript...
Closes #334 ## Background understanding (FYI i'm using `'` as a backtick in in-line code blocks for convenience, whenever i use single-quote, i mean backtick) Tagged templates have operator precedence...
It seems that the parse of a `new` expression combined with a tagged template is incorrect. Consider the snippet below. ```javascript function f() {} function i(template) { return f; }...
The [current library version](https://github.com/tree-sitter/tree-sitter-javascript/tree/v0.21.4?tab=readme-ov-file) references the [The ECMAScript 6th edition, 2015 Spec](http://www.ecma-international.org/ecma-262/6.0/). However, this is quite old. The latest [ECMAScript is the 15th](https://ecma-international.org/publications-and-standards/standards/ecma-262/). It would be good to clarify in...
Hi, This issue is very similar to this [one](https://github.com/tree-sitter/tree-sitter-javascript/issues/329). It concerns the `jsx_text` node. The range of this node is too large as it also covers the white spaces and...
## Problem ### Observed The following parses incorrectly ```js ()=>{} (1) ``` Without this changeset, the grammar treats this as an arrow function that is being invoked. ``` (program [0,...
The following piece of code is valid but it is parsed incorrectly: ```javascript ``` Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or...
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.1 to 2.1.3. Commits See full diff in compare view [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter...