001/*
002 * Copyright (c) 2012-2018 Institut National des Sciences Appliquées de Lyon (INSA Lyon) and others
003 *
004 * This program and the accompanying materials are made available under the
005 * terms of the Eclipse Public License 2.0 which is available at
006 * http://www.eclipse.org/legal/epl-2.0.
007 *
008 * SPDX-License-Identifier: EPL-2.0
009 */
010
011package org.eclipse.golo.compiler.parser;
012
013public class ASTAnonymousFunctionInvocation extends GoloASTNode {
014
015  private boolean constant;
016
017  private boolean onExpression;
018
019  public ASTAnonymousFunctionInvocation(int id) {
020    super(id);
021  }
022
023  public ASTAnonymousFunctionInvocation(GoloParser p, int id) {
024    super(p, id);
025  }
026
027  public void setConstant(boolean constant) {
028    this.constant = constant;
029  }
030
031  public boolean isConstant() {
032    return constant;
033  }
034
035  public boolean isOnExpression() {
036    return onExpression;
037  }
038
039  public void setOnExpression(boolean onExpression) {
040    this.onExpression = onExpression;
041  }
042
043  @Override
044  public Object jjtAccept(GoloParserVisitor visitor, Object data) {
045    return visitor.visit(this, data);
046  }
047
048  @Override
049  public String toString() {
050    return String.format("ASTAnonymousFunctionInvocation{constant=%s, onExpression=%s}",
051        constant,
052        onExpression);
053  }
054}