KumiScript/interpreter/expression/ListFactory.cs

13 lines
No EOL
327 B
C#

namespace KumiScript.Interpreter
{
public class ListFactory
{
public static Expression MakeList(List<Expression> expressions)
{
if (expressions.Any())
return new ProperListExpression(expressions);
return NilExpression.GetInstance();
}
}
}