-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4be77c5
commit 80d73ca
Showing
6 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 15 additions & 6 deletions
21
languages/tree-sitter-stack-graphs-javascript/test/old/compound_literals/objects.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
let obj = { x: 1, y: 2, 0: "z" }; | ||
let obj = { | ||
x: 1, y: 2, 0: "z" }; | ||
|
||
let obj_x = obj.x; | ||
// ^ defined: 1 | ||
// ^ defined: 2 | ||
let x = obj_x; | ||
// ^ defined: 1, 2 | ||
// ^ defined: 4, 2 | ||
|
||
let obj_y = obj["y"]; | ||
// ^ defined: 1 | ||
// ^ defined: 2 | ||
let y = obj_y; | ||
// ^ defined: 1, 5 | ||
// ^ defined: 10, 2 | ||
|
||
let obj_z = obj[0]; | ||
// ^ defined: 1 | ||
// ^ defined: 2 | ||
let z = obj_z; | ||
// ^ defined: 1, 9 | ||
// ^ defined: 16, 2 | ||
|
||
let obj2 = { x, y }; | ||
// ^ defined: 1, 2, 3 | ||
// ^ defined: 1, 5, 6 | ||
// ^ defined: 7, 4, 2 | ||
// ^ defined: 13, 10, 2 |
7 changes: 7 additions & 0 deletions
7
languages/tree-sitter-stack-graphs-javascript/test/old/simple_expressions/comma.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
let x = 1; | ||
let y = (1, x); | ||
// ^ defined: 1 | ||
|
||
let y = (1, x = 5); | ||
let z = x; | ||
// ^ defined: 1, 5 |
4 changes: 4 additions & 0 deletions
4
...uages/tree-sitter-stack-graphs-javascript/test/old/simple_expressions/template_strings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
let x = 1; | ||
|
||
let y = `template ${ x } string`; | ||
// ^ defined: 1 |
4 changes: 4 additions & 0 deletions
4
languages/tree-sitter-stack-graphs-javascript/test/old/simple_expressions/ternary.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
let x = 1; | ||
let y = true ? x++ : 2; | ||
let z = x; | ||
// ^ defined: 1, 2 |
9 changes: 9 additions & 0 deletions
9
languages/tree-sitter-stack-graphs-javascript/test/old/simple_expressions/variables.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let x = 1; | ||
const y = 2; | ||
|
||
var z = x + y; | ||
// ^ defined: 1 | ||
// ^ defined: 2 | ||
|
||
let w = z; | ||
// ^ defined: 1, 2, 4 |