示例#1
0
 /** Returns the text of the conditional expression. */
 public String getExprText() {
   return exprUnion.getExprText();
 }
示例#2
0
 /** Returns a new {@link IfCondNode} built from this builder's state. */
 public IfCondNode build(ErrorReporter unusedForNow) {
   ExprUnion condition = ExprUnion.parseWithV1Fallback(commandText, sourceLocation);
   return new IfCondNode(id, sourceLocation, commandName, condition);
 }
示例#3
0
 /**
  * @param id The id for this node.
  * @param commandName The command name -- either 'if' or 'elseif'.
  * @param exprUnion Determines when the body is performed.
  */
 public IfCondNode(
     int id, SourceLocation sourceLocation, String commandName, ExprUnion exprUnion) {
   super(id, sourceLocation, commandName, exprUnion.getExprText());
   Preconditions.checkArgument(commandName.equals("if") || commandName.equals("elseif"));
   this.exprUnion = Preconditions.checkNotNull(exprUnion);
 }
示例#4
0
 @Override
 public String getCommandText() {
   return exprUnion.getExprText();
 }