view core/src/luan/impl/ReturnStmt.java @ 671:82f130eba7b0

improve declarations
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 12 Apr 2016 14:44:10 -0600
parents b438a47196bc
children
line wrap: on
line source

package luan.impl;

import luan.Luan;
import luan.LuanException;
import luan.LuanFunction;


final class ReturnStmt extends CodeImpl implements Stmt {
	private final Expressions expressions;
	boolean throwReturnException = true;

	ReturnStmt(Expressions expressions) {
		this.expressions = expressions;
	}

	@Override public void eval(LuanStateImpl luan) throws LuanException {
//		luan.returnValues = expressions.eval(luan);
		if( throwReturnException )
			throw new ReturnException();
	}
}