-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JavaScript: don't analyze inside parameter lists
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
5 changed files
with
78 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
--sort=no | ||
--fields=+S |
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
13 changes: 13 additions & 0 deletions
13
Units/parser-javascript.r/js-destructural-binding.d/input-0.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,13 @@ | ||
// Derrived from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment | ||
function userDisplayName({displayName: dname}) { | ||
return dname; | ||
} | ||
|
||
function whois({displayName, fullName: {firstName: name}}) { | ||
return `${displayName} is ${name}`; | ||
} | ||
|
||
function drawChart({size = 'big', coords = {x: 0, y: 0}, radius = 25} = {}) { | ||
console.log(size, coords, radius); | ||
// do some chart drawing | ||
} |
5 changes: 5 additions & 0 deletions
5
Units/parser-javascript.r/js-destructural-binding.d/input-1.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,5 @@ | ||
function f({ u, x }) { | ||
return (u + x) | ||
} | ||
|
||
f({u: 1, x: 2}) |
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