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