Mercurial Hosting > luan
comparison src/luan/interp/GetLocalVar.java @ 31:5cf15507d77e
separate interpreter from interface
git-svn-id: https://luan-java.googlecode.com/svn/trunk@32 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 13 Dec 2012 02:50:04 +0000 |
parents | 09d41f7490a8 |
children | c3eab5a3ce3c |
comparison
equal
deleted
inserted
replaced
30:8d8f4f5caef4 | 31:5cf15507d77e |
---|---|
1 package luan.interp; | 1 package luan.interp; |
2 | |
3 import luan.LuaState; | |
4 | 2 |
5 | 3 |
6 final class GetLocalVar implements Expr { | 4 final class GetLocalVar implements Expr { |
7 private final int index; | 5 private final int index; |
8 | 6 |
9 GetLocalVar(int index) { | 7 GetLocalVar(int index) { |
10 this.index = index; | 8 this.index = index; |
11 } | 9 } |
12 | 10 |
13 @Override public Object eval(LuaState lua) { | 11 @Override public Object eval(LuaStateImpl lua) { |
14 return lua.stack()[index]; | 12 return lua.stack()[index]; |
15 } | 13 } |
16 } | 14 } |