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