Mercurial Hosting > luan
comparison core/src/luan/impl/LuanImpl.java @ 664:71f8f5075df8
compile FnDef
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 07 Apr 2016 15:11:52 -0600 |
parents | b438a47196bc |
children | 58ebfec6178b |
comparison
equal
deleted
inserted
replaced
663:b438a47196bc | 664:71f8f5075df8 |
---|---|
13 | 13 |
14 public final class LuanImpl { | 14 public final class LuanImpl { |
15 private LuanImpl() {} // never | 15 private LuanImpl() {} // never |
16 | 16 |
17 | 17 |
18 private static List<Expressions> listExpressions = new ArrayList<Expressions>(); | 18 private static List list = new ArrayList(); |
19 | 19 |
20 static int addExpressions(Expressions exp) { | 20 static int addObj(Object obj) { |
21 int i = listExpressions.size(); | 21 int i = list.size(); |
22 listExpressions.add(exp); | 22 list.add(obj); |
23 return i; | 23 return i; |
24 } | 24 } |
25 | 25 |
26 public static Expressions getExpressions(int i) { | 26 public static Object getObj(int i) { |
27 return listExpressions.get(i); | 27 return list.get(i); |
28 } | |
29 | |
30 /* | |
31 private static List<Stmt> listStmt = new ArrayList<Stmt>(); | |
32 | |
33 static int addStmt(Stmt stmt) { | |
34 int i = listStmt.size(); | |
35 listStmt.add(stmt); | |
36 return i; | |
37 } | |
38 | |
39 public static Stmt getStmt(int i) { | |
40 return listStmt.get(i); | |
41 } | |
42 */ | |
43 | |
44 private static List<Settable> listSettable = new ArrayList<Settable>(); | |
45 | |
46 static int addSettable(Settable settable) { | |
47 int i = listSettable.size(); | |
48 listSettable.add(settable); | |
49 return i; | |
50 } | |
51 | |
52 public static Settable getSettable(int i) { | |
53 return listSettable.get(i); | |
54 } | 28 } |
55 | 29 |
56 | 30 |
57 public static int len(LuanState luan,Object o) throws LuanException { | 31 public static int len(LuanState luan,Object o) throws LuanException { |
58 if( o instanceof String ) { | 32 if( o instanceof String ) { |