view core/src/luan/impl/ReturnStmt.java @ 663:b438a47196bc

finish compiling function blocks
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 07 Apr 2016 00:01:10 -0600
parents f1150518c467
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();
	}
}