All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cfml.parsing.cfscript.CFAnonymousFunctionExpression Maven / Gradle / Ivy

There is a newer version: 2.11.0
Show newest version
package cfml.parsing.cfscript;

import java.util.List;

import cfml.parsing.cfscript.script.CFFuncDeclStatement;
import cfml.parsing.cfscript.script.CFScriptStatement;
import cfml.parsing.util.ArrayBuilder;

/**
 * Definition of expression tree for a unary expression.
 */

public class CFAnonymousFunctionExpression extends CFExpression implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	
	private CFFuncDeclStatement funcDeclStatement;
	
	public CFAnonymousFunctionExpression(org.antlr.v4.runtime.Token _t, CFFuncDeclStatement funcDeclStatement) {
		super(_t);
		this.funcDeclStatement = funcDeclStatement;
	}
	
	@Override
	public byte getType() {
		return CFExpression.NESTED;
	}
	
	@Override
	public String Decompile(int indent) {
		return (funcDeclStatement.Decompile(0));
	}
	
	public CFFuncDeclStatement getFunctionDeclaration() {
		return funcDeclStatement;
	}
	
	public CFFuncDeclStatement getFuncDeclStatement() {
		return funcDeclStatement;
	}
	
	@Override
	public List decomposeExpression() {
		return ArrayBuilder.createCFExpression();
	}
	
	@Override
	public List decomposeScript() {
		return ArrayBuilder.createCFScriptStatement(funcDeclStatement);
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy