Mercurial Hosting > luan
view core/src/luan/impl/GetUpVar.java @ 645:859c0dedc8b6
remove LuanSource
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Mar 2016 18:09:51 -0600 |
parents | 0742ac78fa69 |
children |
line wrap: on
line source
package luan.impl; final class GetUpVar extends CodeImpl implements Expr { private final int index; GetUpVar(int index) { if( index < 0 ) throw new RuntimeException(); this.index = index; } @Override public Object eval(LuanStateImpl luan) { return luan.closure().upValues()[index].get(); } }