Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CompiledAction.cs
Go to the documentation of this file.
2
4
5internal abstract class CompiledAction : Action
6{
7 internal abstract void Compile(Compiler compiler);
8
9 internal virtual bool CompileAttribute(Compiler compiler)
10 {
11 return false;
12 }
13
15 {
17 string localName = input.LocalName;
18 if (!input.MoveToFirstAttribute())
19 {
20 return;
21 }
22 do
23 {
24 if (input.NamespaceURI.Length != 0)
25 {
26 continue;
27 }
28 try
29 {
31 {
32 throw XsltException.Create(System.SR.Xslt_InvalidAttribute, input.LocalName, localName);
33 }
34 }
35 catch
36 {
37 if (!compiler.ForwardCompatibility)
38 {
39 throw;
40 }
41 }
42 }
43 while (input.MoveToNextAttribute());
44 input.ToParent();
45 }
46
47 internal static string PrecalculateAvt(ref Avt avt)
48 {
49 string result = null;
50 if (avt != null && avt.IsConstant)
51 {
52 result = avt.Evaluate(null, null);
53 avt = null;
54 }
55 return result;
56 }
57
59 {
60 string name = compiler.Input.Name;
61 if (!compiler.Recurse())
62 {
63 return;
64 }
65 do
66 {
67 XPathNodeType nodeType = compiler.Input.NodeType;
68 if (nodeType != XPathNodeType.Whitespace && nodeType != XPathNodeType.Comment && nodeType != XPathNodeType.ProcessingInstruction)
69 {
71 }
72 }
73 while (compiler.Advance());
74 compiler.ToParent();
75 }
76
81
83 {
84 if (!attr)
85 {
87 }
88 }
89}
static string Xslt_MissingAttribute
Definition SR.cs:1882
static string Xslt_NotEmptyContents
Definition SR.cs:1878
static string Xslt_InvalidAttribute
Definition SR.cs:1880
Definition SR.cs:7
static XsltException Create(string res, params string[] args)
void CheckRequiredAttribute(Compiler compiler, bool attr, string attrName)
void CompileAttributes(Compiler compiler)
void Compile(Compiler compiler)
virtual bool CompileAttribute(Compiler compiler)
void CheckRequiredAttribute(Compiler compiler, object attrValue, string attrName)
static string PrecalculateAvt(ref Avt avt)