view core/src/luan/impl/GetLocalVar.java @ 593:92c9fa5e39e6

remove theme "Get" and "Set", and add "define"
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 31 Aug 2015 10:16:57 -0600
parents 0742ac78fa69
children 859c0dedc8b6
line wrap: on
line source

package luan.impl;

import luan.LuanElement;


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

	GetLocalVar(LuanElement se,int index) {
		super(se);
		if( index < 0 )  throw new RuntimeException();
		this.index = index;
	}

	@Override public Object eval(LuanStateImpl luan) {
		return luan.stackGet(index);
	}
}