view core/src/luan/impl/ExpressionsExpr.java @ 200:9fb218211763

add Package.block(); add LuanException.getFullMessage(); git-svn-id: https://luan-java.googlecode.com/svn/trunk@201 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 03 Jul 2014 22:22:16 +0000
parents 3dcb0f9bee82
children b48cfa14ba60
line wrap: on
line source

package luan.impl;

import java.util.List;
import luan.Luan;
import luan.LuanException;
import luan.LuanSource;


final class ExpressionsExpr implements Expr {
	private final Expressions expressions;

	ExpressionsExpr(Expressions expressions) {
		if( expressions==null )
			throw new NullPointerException();
		this.expressions = expressions;
	}

	@Override public Object eval(LuanStateImpl luan) throws LuanException {
		return Luan.first( expressions.eval(luan) );
	}

	public LuanSource.Element se() {
		return expressions.se();
	}

}