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