This commit is contained in:
ninemine
2025-06-30 21:49:33 +08:00
parent f92a688c77
commit dbea849f6c
4 changed files with 42 additions and 6 deletions

View 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;
}
}
}