mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +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:
@@ -3,44 +3,37 @@ package com.semmle.js.ast;
|
||||
/**
|
||||
* A unary expression such as <code>!x</code> or <code>void(0)</code>.
|
||||
*
|
||||
* Note that increment and decrement expressions are represented by {@link UpdateExpression}.
|
||||
* <p>Note that increment and decrement expressions are represented by {@link UpdateExpression}.
|
||||
*/
|
||||
public class UnaryExpression extends Expression {
|
||||
private final String operator;
|
||||
private final Expression argument;
|
||||
private final boolean prefix;
|
||||
private final String operator;
|
||||
private final Expression argument;
|
||||
private final boolean prefix;
|
||||
|
||||
public UnaryExpression(SourceLocation loc, String operator, Expression argument, Boolean prefix) {
|
||||
super("UnaryExpression", loc);
|
||||
this.operator = operator;
|
||||
this.argument = argument;
|
||||
this.prefix = prefix == Boolean.TRUE;
|
||||
}
|
||||
public UnaryExpression(SourceLocation loc, String operator, Expression argument, Boolean prefix) {
|
||||
super("UnaryExpression", loc);
|
||||
this.operator = operator;
|
||||
this.argument = argument;
|
||||
this.prefix = prefix == Boolean.TRUE;
|
||||
}
|
||||
|
||||
@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 operator of this unary expression.
|
||||
*/
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
/** The operator of this unary expression. */
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
/**
|
||||
* The argument of this unary expression.
|
||||
*/
|
||||
public Expression getArgument() {
|
||||
return argument;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the operator of this unary expression a prefix operator?
|
||||
*/
|
||||
public boolean isPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
/** The argument of this unary expression. */
|
||||
public Expression getArgument() {
|
||||
return argument;
|
||||
}
|
||||
|
||||
/** Is the operator of this unary expression a prefix operator? */
|
||||
public boolean isPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user