refactored and reworked functions in scarpet

This commit is contained in:
gnembon committed 2019-11-18 00:56:50 -04:00
1 parent 3feb7bffbb
commit 95b85928f9
17 files changed
+362 -220

No files matched your search

@@ -1,6 +1,6 @@
package carpet.script;
import carpet.CarpetServer;
import carpet.script.exception.ExpressionException;
import org.apache.commons.lang3.StringUtils;
import java.util.Collections;
@@ -26,6 +26,20 @@ public class ExpressionInspector
return e.getName();
}
public static Expression Expression_cloneWithName(Expression e, String name, Tokenizer.Token token)
{
Expression copy = null;
try
{
copy = e.clone();
}
catch (CloneNotSupportedException ex)
{
throw new ExpressionException(e, token, "Problems in allocating global function "+name);
}
return copy.withName(name);
}
private static TreeSet<String> scarpetFunctions;
private static TreeSet<String> APIFunctions;
static