JS: improve comment syntax

This commit is contained in:
Esben Sparre Andreasen
2019-11-21 13:16:40 +01:00
parent 6328a0a8b9
commit 23d29a80db

View File

@@ -48,16 +48,16 @@ private predicate isBoundInMethod(MethodDeclaration method) {
// exclude the binding assignments
not thiz.getAPropertySource() = binder
|
// myBindAll(this)
// `myBindAll(this)`
binder.getNumArgument() = 1
or
// myBindSome(this, [<name1>, <name2>])
// `myBindSome(this, [<name1>, <name2>])`
exists(DataFlow::ArrayCreationNode names |
names.flowsTo(binder.getAnArgument()) and
names.getAnElement().mayHaveStringValue(name)
)
or
// myBindSome(this, <name1>, <name2>)
// `myBindSome(this, <name1>, <name2>)`
binder.getAnArgument().mayHaveStringValue(name)
)
)
@@ -70,10 +70,10 @@ private predicate isBoundInMethod(MethodDeclaration method) {
) and
name.regexpMatch("(?i).*(bind|bound).*")
|
// @autobind
// `@autobind`
decoration.(Identifier).getName() = name
or
// @action.bound
// `@action.bound`
decoration.(PropAccess).getPropertyName() = name
)
}