Files
Convention-CSharp/Convention/[Symbolization]/Detail/ScriptWordVariable.cs

27 lines
786 B
C#
Raw Normal View History

2025-07-03 18:46:52 +08:00
namespace Convention.Symbolization.Internal
{
public class ScriptWordVariable : CloneableVariable<ScriptWordVariable>
{
2025-07-05 16:57:59 +08:00
public string Word => this.SymbolInfo.SymbolName;
2025-07-03 18:46:52 +08:00
2025-07-05 16:57:59 +08:00
public ScriptWordVariable(string word, int lineIndex, int wordIndex) : base((string)word.Clone(), lineIndex, wordIndex)
2025-07-03 18:46:52 +08:00
{
}
2025-07-05 16:57:59 +08:00
public override ScriptWordVariable CloneVariable(string targetSymbolName, int lineIndex, int wordIndex)
2025-07-03 18:46:52 +08:00
{
2025-07-05 16:57:59 +08:00
return new ScriptWordVariable(Word, lineIndex, wordIndex);
2025-07-03 18:46:52 +08:00
}
public override bool Equals(ScriptWordVariable other)
{
2025-07-05 16:57:59 +08:00
return other is not null && Word.Equals(other.Word);
2025-07-03 18:46:52 +08:00
}
2025-07-03 21:50:26 +08:00
public override string ToString()
2025-07-03 18:46:52 +08:00
{
2025-07-05 16:57:59 +08:00
return Word;
2025-07-03 18:46:52 +08:00
}
}
}