comparison core/src/luan/Luan.java @ 694:b620b8e1010f

remove Luan.load() allow_expression param and add Luan.eval()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 20 Apr 2016 20:56:08 -0600
parents ca169567ce07
children
comparison
equal deleted inserted replaced
693:ca169567ce07 694:b620b8e1010f
1 package luan; 1 package luan;
2 2
3 import java.util.List; 3 import java.util.List;
4 import luan.modules.BasicLuan; 4 import luan.modules.BasicLuan;
5 import luan.impl.LuanCompiler;
5 6
6 7
7 public final class Luan { 8 public final class Luan {
8 9
9 public static void main(String[] args) throws LuanException { 10 public static void main(String[] args) throws LuanException {
137 if( f == null ) 138 if( f == null )
138 return null; 139 return null;
139 return checkFunction(f); 140 return checkFunction(f);
140 } 141 }
141 142
143 public static LuanFunction load(String text,String sourceName,LuanTable env)
144 throws LuanException
145 {
146 return LuanCompiler.compile(text,sourceName,env);
147 }
148
149 public static LuanFunction load(String text,String sourceName)
150 throws LuanException
151 {
152 return load(text,sourceName,null);
153 }
142 154
143 155
144 private Luan() {} // never 156 private Luan() {} // never
145 } 157 }