view core/src/luan/impl/GetUpVar.java @ 438:153326a0ef85

Added tag 0.6 for changeset 6cfbf45a1885
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 04 May 2015 11:08:09 -0600
parents 3dcb0f9bee82
children b48cfa14ba60
line wrap: on
line source

package luan.impl;

import luan.LuanSource;


final class GetUpVar extends CodeImpl implements Expr {
	private final int index;

	GetUpVar(LuanSource.Element se,int index) {
		super(se);
		this.index = index;
	}

	@Override public Object eval(LuanStateImpl luan) {
		return luan.closure().upValues()[index].get();
	}
}