JS: Address comments

This commit is contained in:
Asger F
2019-07-23 17:06:57 +01:00
parent 1c3ce09607
commit ff8529d3ec
3 changed files with 6 additions and 6 deletions

View File

@@ -100,7 +100,7 @@ module GlobalAccessPath {
* foo = foo || {};
* ```
*/
predicate isSelfAssignment(DataFlow::Node rhs) {
private predicate isSelfAssignment(DataFlow::Node rhs) {
fromRhs(rhs) = fromReference(rhs)
}
@@ -108,7 +108,7 @@ module GlobalAccessPath {
* Holds if there is an assignment to `accessPath` in `file`, not counting
* self-assignments.
*/
predicate isAssignedInFile(string accessPath, File file) {
private predicate isAssignedInFile(string accessPath, File file) {
exists(DataFlow::Node rhs |
fromRhs(rhs) = accessPath and
not isSelfAssignment(rhs) and

View File

@@ -466,7 +466,7 @@ module JSDoc {
}
/**
* Holds if the alises declared in this environment should be in scope
* Holds if the aliases declared in this environment should be in scope
* within the given container.
*
* Specifically, this holds if this environment declares at least one

View File

@@ -172,8 +172,8 @@ module DataFlow {
* has `e` as its immediate predecessor, even if the function can fall over the
* end and return `undefined`.
*
* - A destructuring property pattern with a default value has both the `PropRead`
* and its default value as immediate predecessors.
* - A destructuring property pattern or element pattern with a default value has
* both the `PropRead` and its default value as immediate predecessors.
*/
cached
DataFlow::Node getImmediatePredecessor() {
@@ -1158,7 +1158,7 @@ module DataFlow {
* For example, in `let { p: value } = f()`, the `value` pattern maps to a `PropRead`
* extracting the `p` property.
*/
DataFlow::PropRead patternPropRead(BindingPattern value) {
private DataFlow::PropRead patternPropRead(BindingPattern value) {
exists(PropertyPattern prop |
value = prop.getValuePattern() and
result = TPropNode(prop)