removed unneded reference
This commit is contained in:
1 parent
f76afb5b2c
commit
34bf877bc7
2 files changed
+5
-8
No files matched your search
@@ -689,7 +689,7 @@ public class Expression implements Cloneable
|
|||||||
}
|
}
|
||||||
if (contextValues.isEmpty()) contextValues = null;
|
if (contextValues.isEmpty()) contextValues = null;
|
||||||
|
|
||||||
FunctionValue result = new FunctionValue(expr, token, module, name, code, arguments, contextValues);
|
FunctionValue result = new FunctionValue(expr, token, name, code, arguments, contextValues);
|
||||||
// do not store lambda definitions
|
// do not store lambda definitions
|
||||||
if (!name.equals("_")) context.host.addUserDefinedFunction(name, result);
|
if (!name.equals("_")) context.host.addUserDefinedFunction(name, result);
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -24,17 +24,15 @@ public class FunctionValue extends Value implements Fluff.ILazyFunction
|
|||||||
private Expression expression;
|
private Expression expression;
|
||||||
private Tokenizer.Token token;
|
private Tokenizer.Token token;
|
||||||
private String name;
|
private String name;
|
||||||
private String containedPackage;
|
|
||||||
private LazyValue body;
|
private LazyValue body;
|
||||||
private Map<String, LazyValue> outerState;
|
private Map<String, LazyValue> outerState;
|
||||||
private List<String> args;
|
private List<String> args;
|
||||||
private static long variantCounter = 1;
|
private static long variantCounter = 1;
|
||||||
private long variant;
|
private long variant;
|
||||||
|
|
||||||
private FunctionValue(Expression expression, Tokenizer.Token token, String cpackage, String name, LazyValue body, List<String> args)
|
private FunctionValue(Expression expression, Tokenizer.Token token, String name, LazyValue body, List<String> args)
|
||||||
{
|
{
|
||||||
this.expression = expression;
|
this.expression = expression;
|
||||||
this.containedPackage = cpackage;
|
|
||||||
this.token = token;
|
this.token = token;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.body = body;
|
this.body = body;
|
||||||
@@ -43,10 +41,9 @@ public class FunctionValue extends Value implements Fluff.ILazyFunction
|
|||||||
variant = 0L;
|
variant = 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FunctionValue(Expression expression, Tokenizer.Token token, ModuleInterface code, String name, LazyValue body, List<String> args, Map<String, LazyValue> outerState)
|
public FunctionValue(Expression expression, Tokenizer.Token token, String name, LazyValue body, List<String> args, Map<String, LazyValue> outerState)
|
||||||
{
|
{
|
||||||
this.expression = expression;
|
this.expression = expression;
|
||||||
this.containedPackage = code==null?null:code.getName();
|
|
||||||
this.token = token;
|
this.token = token;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.body = body;
|
this.body = body;
|
||||||
@@ -61,7 +58,7 @@ public class FunctionValue extends Value implements Fluff.ILazyFunction
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String fullName() {return containedPackage == null?name:name+"["+containedPackage+"]";}
|
public String fullName() {return expression.module == null?name:name+"["+expression.module.getName()+"]";}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getBoolean()
|
public boolean getBoolean()
|
||||||
@@ -72,7 +69,7 @@ public class FunctionValue extends Value implements Fluff.ILazyFunction
|
|||||||
@Override
|
@Override
|
||||||
protected Value clone()
|
protected Value clone()
|
||||||
{
|
{
|
||||||
FunctionValue ret = new FunctionValue(expression, token, containedPackage, name, body, args);
|
FunctionValue ret = new FunctionValue(expression, token, name, body, args);
|
||||||
ret.outerState = this.outerState;
|
ret.outerState = this.outerState;
|
||||||
ret.variant = this.variant;
|
ret.variant = this.variant;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in new issue
Block a user