Mercurial Hosting > luan
comparison src/luan/interp/ValuesExpr.java @ 3:7a2cdbc5767f
add LuaState
git-svn-id: https://luan-java.googlecode.com/svn/trunk@4 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 16 Nov 2012 05:23:12 +0000 |
parents | 4da26b11d12a |
children |
comparison
equal
deleted
inserted
replaced
2:4da26b11d12a | 3:7a2cdbc5767f |
---|---|
1 package luan.interp; | 1 package luan.interp; |
2 | 2 |
3 import java.util.List; | 3 import java.util.List; |
4 import luan.Lua; | 4 import luan.Lua; |
5 import luan.LuaException; | 5 import luan.LuaException; |
6 import luan.LuaState; | |
6 | 7 |
7 | 8 |
8 final class ValuesExpr extends Expr { | 9 final class ValuesExpr extends Expr { |
9 private final Values values; | 10 private final Values values; |
10 | 11 |
11 ValuesExpr(Values values) { | 12 ValuesExpr(Values values) { |
12 this.values = values; | 13 this.values = values; |
13 } | 14 } |
14 | 15 |
15 @Override Object eval() throws LuaException { | 16 @Override Object eval(LuaState lua) throws LuaException { |
16 List list = values.eval(); | 17 List list = values.eval(lua); |
17 return list.isEmpty() ? null : list.get(0); | 18 return list.isEmpty() ? null : list.get(0); |
18 } | 19 } |
19 } | 20 } |