Mercurial Hosting > luan
view core/src/luan/impl/GetLocalVar.java @ 667:08966099aa6d
implement Closure directly
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 08 Apr 2016 07:00:17 -0600 |
parents | 859c0dedc8b6 |
children |
line wrap: on
line source
package luan.impl; final class GetLocalVar extends CodeImpl implements Expr { private final int index; GetLocalVar(int index) { if( index < 0 ) throw new RuntimeException(); this.index = index; } @Override public Object eval(LuanStateImpl luan) { return luan.stackGet(index); } }