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