mirror of
https://github.com/github/codeql.git
synced 2026-07-20 10:48:17 +02:00
JavaScript: Autoformat extractor sources using google-java-format.
No special settings; command: find javascript/extractor/src -name "*.java" | xargs java -jar /path/to/google-java-format-1.7-all-deps.jar --replace
This commit is contained in:
@@ -1,49 +1,40 @@
|
||||
package com.semmle.js.ast;
|
||||
|
||||
/**
|
||||
* An if statement.
|
||||
*/
|
||||
/** An if statement. */
|
||||
public class IfStatement extends Statement {
|
||||
private final Expression test;
|
||||
private final Statement consequent, alternate;
|
||||
private final Expression test;
|
||||
private final Statement consequent, alternate;
|
||||
|
||||
public IfStatement(SourceLocation loc, Expression test, Statement consequent, Statement alternate) {
|
||||
super("IfStatement", loc);
|
||||
this.test = test;
|
||||
this.consequent = consequent;
|
||||
this.alternate = alternate;
|
||||
}
|
||||
public IfStatement(
|
||||
SourceLocation loc, Expression test, Statement consequent, Statement alternate) {
|
||||
super("IfStatement", loc);
|
||||
this.test = test;
|
||||
this.consequent = consequent;
|
||||
this.alternate = alternate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, A> A accept(Visitor<Q, A> v, Q q) {
|
||||
return v.visit(this, q);
|
||||
}
|
||||
@Override
|
||||
public <Q, A> A accept(Visitor<Q, A> v, Q q) {
|
||||
return v.visit(this, q);
|
||||
}
|
||||
|
||||
/**
|
||||
* The test expression of this if statement.
|
||||
*/
|
||||
public Expression getTest() {
|
||||
return test;
|
||||
}
|
||||
/** The test expression of this if statement. */
|
||||
public Expression getTest() {
|
||||
return test;
|
||||
}
|
||||
|
||||
/**
|
||||
* The then-branch of this if statement.
|
||||
*/
|
||||
public Statement getConsequent() {
|
||||
return consequent;
|
||||
}
|
||||
/** The then-branch of this if statement. */
|
||||
public Statement getConsequent() {
|
||||
return consequent;
|
||||
}
|
||||
|
||||
/**
|
||||
* The else-branch of this if statement; may be null.
|
||||
*/
|
||||
public Statement getAlternate() {
|
||||
return alternate;
|
||||
}
|
||||
/** The else-branch of this if statement; may be null. */
|
||||
public Statement getAlternate() {
|
||||
return alternate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this if statement have an else branch?
|
||||
*/
|
||||
public boolean hasAlternate() {
|
||||
return alternate != null;
|
||||
}
|
||||
/** Does this if statement have an else branch? */
|
||||
public boolean hasAlternate() {
|
||||
return alternate != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user