view core/src/luan/impl/GetUpVar.java @ 179:bf9c7111a371

minor git-svn-id: https://luan-java.googlecode.com/svn/trunk@180 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Tue, 24 Jun 2014 00:05:53 +0000
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();
	}
}