Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Stylesheet.cs
Go to the documentation of this file.
3
4namespace System.Xml.Xsl.Xslt;
5
6internal sealed class Stylesheet : StylesheetLevel
7{
8 private readonly Compiler _compiler;
9
11
13
15
16 private readonly int _importPrecedence;
17
18 private int _orderNumber;
19
21
23
25
27
28 public void AddTemplateMatch(Template template, QilLoop filter)
29 {
30 if (!TemplateMatches.TryGetValue(template.Mode, out var value))
31 {
33 value = list2;
34 }
35 value.Add(new TemplateMatch(template, filter));
36 }
37
38 public void SortTemplateMatches()
39 {
40 foreach (QilName key in TemplateMatches.Keys)
41 {
43 }
44 }
45
54
59
60 public bool AddVarPar(VarPar var)
61 {
63 {
64 if (globalVarPar.Name.Equals(var.Name))
65 {
67 }
68 }
70 return true;
71 }
72
73 public bool AddTemplate(Template template)
74 {
77 _compiler.AllTemplates.Add(template);
78 if (template.Name != null)
79 {
80 if (!_compiler.NamedTemplates.TryGetValue(template.Name, out var value))
81 {
82 _compiler.NamedTemplates[template.Name] = template;
83 }
84 else if (value.ImportPrecedence == template.ImportPrecedence)
85 {
86 return false;
87 }
88 }
89 if (template.Match != null)
90 {
91 Templates.Add(template);
92 }
93 return true;
94 }
95}
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
Dictionary< QilName, Template > NamedTemplates
Definition Compiler.cs:97
Dictionary< QilName, VarPar > AllGlobalVarPars
Definition Compiler.cs:95
List< ProtoTemplate > AllTemplates
Definition Compiler.cs:93
readonly Compiler _compiler
Definition Stylesheet.cs:8
Dictionary< QilName, List< TemplateMatch > > TemplateMatches
Definition Stylesheet.cs:24
Dictionary< QilName, AttributeSet > AttributeSets
Definition Stylesheet.cs:14
bool AddTemplate(Template template)
Definition Stylesheet.cs:73
Stylesheet(Compiler compiler, int importPrecedence)
Definition Stylesheet.cs:46
List< XslNode > GlobalVarPars
Definition Stylesheet.cs:12
void AddWhitespaceRule(int index, WhitespaceRule rule)
Definition Stylesheet.cs:55
List< WhitespaceRule >[] WhitespaceRules
Definition Stylesheet.cs:20
void AddTemplateMatch(Template template, QilLoop filter)
Definition Stylesheet.cs:28
static readonly TemplateMatchComparer Comparer