1 // =================================
 2 // Copyright (c) 2024 Seppo Laakko
 3 // Distributed under the MIT license
 4 // =================================
 5 
 6 using System;
 7 
 8 namespace System.Xml
 9 {
10     public class Text : CharacterData
11     {
12         public Text(const System.Lex.Span& span_int fileIndex_) : this(NodeKind.textNodespan_fileIndex_"text")
13         {
14         }
15         public Text(const System.Lex.Span& span_int fileIndex_const string& text_) : base(NodeKind.textNodespan_-1"text"text_)
16         {
17         }
18         public Text(NodeKind kind_const System.Lex.Span& span_int fileIndex_const string& name_) : base(kind_span_fileIndex_name_)
19         {
20         }
21         public Text(NodeKind kind_const System.Lex.Span& span_int fileIndex_const string& name_const string& text_) : base(kind_span_fileIndex_name_text_)
22         {
23         }
24         public override void Accept(Visitor& visitor)
25         {
26             visitor.Visit(*this);
27         }
28         public override Node* Clone(bool deep) const
29         {
30             return new Text(Span()FileIndex()Data());
31         }
32     }
33 
34     public Text* MakeText(const string& text)
35     {
36         return new Text(System.Lex.Span()-1text);
37     }
38 }