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