JS: Autoformat

This commit is contained in:
Asger Feldthaus
2020-04-09 07:45:00 +01:00
parent 47934310ef
commit d9f81b082b
2 changed files with 9 additions and 10 deletions

View File

@@ -325,7 +325,12 @@ class LocalVariable extends Variable {
* If it has no declaration, the location of its declaring scope is used.
*/
Location getLocation() {
result = min(Location loc | loc = getADeclaration().getLocation() | loc order by loc.getStartLine(), loc.getStartColumn() )
result =
min(Location loc |
loc = getADeclaration().getLocation()
|
loc order by loc.getStartLine(), loc.getStartColumn()
)
or
not exists(getADeclaration()) and
result = getDeclaringContainer().getLocation()

View File

@@ -1230,9 +1230,7 @@ module DataFlow {
CapturedVariableNode() { this = TCapturedVariableNode(variable) }
override BasicBlock getBasicBlock() {
result = variable.getDeclaringContainer().getStartBB()
}
override BasicBlock getBasicBlock() { result = variable.getDeclaringContainer().getStartBB() }
override predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
@@ -1240,9 +1238,7 @@ module DataFlow {
variable.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
}
override string toString() {
result = variable.getName()
}
override string toString() { result = variable.getName() }
}
/**
@@ -1250,9 +1246,7 @@ module DataFlow {
*
* Gets a data flow node representing the given captured variable.
*/
Node capturedVariableNode(LocalVariable variable) {
result = TCapturedVariableNode(variable)
}
Node capturedVariableNode(LocalVariable variable) { result = TCapturedVariableNode(variable) }
/**
* Gets the data flow node corresponding to `nd`.