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 ASTFunctionInvocation extends GoloASTNode implements NamedNode {
014
015  private String name;
016
017  private boolean constant;
018
019  public ASTFunctionInvocation(int id) {
020    super(id);
021  }
022
023  public ASTFunctionInvocation(GoloParser p, int id) {
024    super(p, id);
025  }
026
027  @Override
028  public String getName() {
029    return name;
030  }
031
032  @Override
033  public void setName(String name) {
034    this.name = name;
035  }
036
037  public void setConstant(boolean constant) {
038    this.constant = constant;
039  }
040
041  public boolean isConstant() {
042    return constant;
043  }
044
045  @Override
046  public String toString() {
047    return String.format("ASTFunctionInvocation{name='%s', constant=%s}", name, constant);
048  }
049
050  @Override
051  public Object jjtAccept(GoloParserVisitor visitor, Object data) {
052    return visitor.visit(this, data);
053  }
054}