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

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

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

import java.util.ArrayList;

import org.antlr.v4.runtime.Token;

public class ArgumentsVector extends ArrayList implements HasToken {
	
	private static final long serialVersionUID = 1L;
	CFExpression parent;
	
	public ArgumentsVector() {
		super();
	}
	
	public void addNamedArg(CFExpression name, CFExpression _val) {
		if (name == null) {
			add(_val);
		} else {
			add(new CFAssignmentExpression(name.getToken(), name, _val));
		}
	}
	
	@Override
	public Token getToken() {
		return size() > 0 ? get(0).getToken() : null;
	}
	
	@Override
	public CFExpression getParent() {
		return parent;
	}
	
	public void setParent(CFExpression parent) {
		this.parent = parent;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy