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