Mercurial Hosting > luan
comparison src/luan/interp/GetUpVar.java @ 48:64ecb7a3aad7
rename Lua to Luan
git-svn-id: https://luan-java.googlecode.com/svn/trunk@49 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 28 Dec 2012 03:29:12 +0000 |
parents | e3624b7cd603 |
children | 8ede219cd111 |
comparison
equal
deleted
inserted
replaced
47:659c7139e903 | 48:64ecb7a3aad7 |
---|---|
1 package luan.interp; | 1 package luan.interp; |
2 | 2 |
3 import luan.LuaSource; | 3 import luan.LuanSource; |
4 | 4 |
5 | 5 |
6 final class GetUpVar extends CodeImpl implements Expr { | 6 final class GetUpVar extends CodeImpl implements Expr { |
7 private final int index; | 7 private final int index; |
8 | 8 |
9 GetUpVar(LuaSource.Element se,int index) { | 9 GetUpVar(LuanSource.Element se,int index) { |
10 super(se); | 10 super(se); |
11 this.index = index; | 11 this.index = index; |
12 } | 12 } |
13 | 13 |
14 @Override public Object eval(LuaStateImpl lua) { | 14 @Override public Object eval(LuanStateImpl lua) { |
15 return lua.closure().upValues[index].get(); | 15 return lua.closure().upValues[index].get(); |
16 } | 16 } |
17 } | 17 } |