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