KumiScript/interpreter/expression/ListFactory.cs

13 lines
327 B
C#
Raw Permalink Normal View History

2024-01-26 05:37:51 +00:00
namespace KumiScript.Interpreter
{
public class ListFactory
{
public static Expression MakeList(List<Expression> expressions)
2024-01-26 05:37:51 +00:00
{
if (expressions.Any())
return new ProperListExpression(expressions);
return NilExpression.GetInstance();
}
}
}