EP 0.1.1
This commit is contained in:
@@ -6,11 +6,13 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Convention.Symbolization.Internal
|
||||
{
|
||||
public class Function : Variable
|
||||
public abstract class Function : Variable
|
||||
{
|
||||
public Variable Invoke(Variable[] parameters)
|
||||
public readonly FunctionSymbol FunctionInfo;
|
||||
public abstract Variable Invoke(Variable[] parameters);
|
||||
public Function(string symbolName, Type returnType, Type[] parameterTypes, Modification[] modifiers)
|
||||
{
|
||||
|
||||
FunctionInfo = new(symbolName, returnType, parameterTypes, modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Convention.Symbolization.Internal
|
||||
{
|
||||
public class Modification : Variable
|
||||
public abstract class Modification : Variable
|
||||
{
|
||||
}
|
||||
}
|
||||
|
34
Convention/[Symbolization]/Internal/Structure.cs
Normal file
34
Convention/[Symbolization]/Internal/Structure.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Convention.Symbolization.Internal
|
||||
{
|
||||
public sealed class Structure : Variable
|
||||
{
|
||||
public readonly string Name;
|
||||
private Dictionary<VariableSymbol, Variable> VariableSymbolAndDefaultValue;
|
||||
|
||||
private Structure(string name)
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
public Structure(string name, Dictionary<VariableSymbol, Variable> variableSymbolAndDefaultValue)
|
||||
{
|
||||
this.Name = name;
|
||||
this.VariableSymbolAndDefaultValue = variableSymbolAndDefaultValue;
|
||||
}
|
||||
|
||||
public override object Clone()
|
||||
{
|
||||
Structure target = new(Name);
|
||||
foreach (var pair in VariableSymbolAndDefaultValue)
|
||||
{
|
||||
target.VariableSymbolAndDefaultValue[pair.Key] = pair.Value;
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
}
|
@@ -6,9 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Convention.Symbolization.Internal
|
||||
{
|
||||
public class Variable
|
||||
public abstract class Variable : ICloneable
|
||||
{
|
||||
|
||||
public abstract object Clone();
|
||||
}
|
||||
|
||||
public readonly struct VariableSymbol
|
||||
|
Reference in New Issue
Block a user