view core/src/luan/impl/GetUpVar.java @ 372:f08cefa4594c

start editing manual
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 17 Apr 2015 07:58:20 -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();
	}
}