Files
Upsilon/Upsilon/BaseTypes/LuaFunction.cs
2018-11-19 12:17:21 +01:00

27 lines
786 B
C#

using System.Collections.Immutable;
using Upsilon.Binder;
using Upsilon.Evaluator;
namespace Upsilon.BaseTypes
{
internal class LuaFunction : LuaType, IScopeOwner
{
public LuaFunction(ImmutableArray<VariableSymbol> parameters, BoundBlockStatement block,
EvaluationScope parentScope)
{
Parameters = parameters;
Block = block;
EvaluationScope = new EvaluationScope(parentScope);
}
public override Type Type => Type.Function;
public override object ToCSharpObject()
{
return this;
}
public ImmutableArray<VariableSymbol> Parameters { get; }
public BoundBlockStatement Block { get; }
public EvaluationScope EvaluationScope { get; }
}
}