Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Analyze()

virtual QilNode System.Xml.Xsl.IlGen.XmlILStateAnalyzer.Analyze ( QilNode ndConstr,
QilNode ndContent )
inlinevirtual

Reimplemented in System.Xml.Xsl.IlGen.XmlILElementAnalyzer.

Definition at line 20 of file XmlILStateAnalyzer.cs.

21 {
22 if (ndConstr == null)
23 {
24 parentInfo = null;
25 xstates = PossibleXmlStates.WithinSequence;
26 withinElem = false;
28 }
29 else
30 {
31 parentInfo = XmlILConstructInfo.Write(ndConstr);
32 if (ndConstr.NodeType == QilNodeType.Function)
33 {
34 parentInfo.ConstructMethod = XmlILConstructMethod.Writer;
35 PossibleXmlStates possibleXmlStates = PossibleXmlStates.None;
36 foreach (XmlILConstructInfo item in parentInfo.CallersInfo)
37 {
38 if (possibleXmlStates == PossibleXmlStates.None)
39 {
40 possibleXmlStates = item.InitialStates;
41 }
42 else if (possibleXmlStates != item.InitialStates)
43 {
44 possibleXmlStates = PossibleXmlStates.Any;
45 }
47 }
49 }
50 else
51 {
52 if (ndConstr.NodeType != QilNodeType.Choice)
53 {
54 XmlILConstructInfo xmlILConstructInfo2 = parentInfo;
55 PossibleXmlStates initialStates = (parentInfo.FinalStates = PossibleXmlStates.WithinSequence);
57 }
58 if (ndConstr.NodeType != QilNodeType.RtfCtor)
59 {
60 parentInfo.ConstructMethod = XmlILConstructMethod.WriterThenIterator;
61 }
62 }
64 switch (ndConstr.NodeType)
65 {
66 case QilNodeType.DocumentCtor:
67 xstates = PossibleXmlStates.WithinContent;
68 break;
69 case QilNodeType.ElementCtor:
70 xstates = PossibleXmlStates.EnumAttrs;
71 break;
72 case QilNodeType.AttributeCtor:
73 xstates = PossibleXmlStates.WithinAttr;
74 break;
75 case QilNodeType.CommentCtor:
76 xstates = PossibleXmlStates.WithinComment;
77 break;
78 case QilNodeType.PICtor:
79 xstates = PossibleXmlStates.WithinPI;
80 break;
81 case QilNodeType.XsltCopy:
82 xstates = PossibleXmlStates.Any;
83 break;
84 case QilNodeType.Function:
86 break;
87 case QilNodeType.RtfCtor:
88 xstates = PossibleXmlStates.WithinContent;
89 break;
90 case QilNodeType.Choice:
91 xstates = PossibleXmlStates.Any;
92 break;
93 }
94 if (ndContent != null)
95 {
97 }
98 if (ndConstr.NodeType == QilNodeType.Choice)
99 {
101 }
102 if (ndConstr.NodeType == QilNodeType.Function)
103 {
105 }
106 }
107 return ndContent;
108 }
static XmlILConstructInfo Write(QilNode nd)
virtual QilNode AnalyzeContent(QilNode nd)
virtual void AnalyzeChoice(QilChoice ndChoice, XmlILConstructInfo info)

References System.Xml.Xsl.IlGen.XmlILStateAnalyzer.AnalyzeChoice(), System.Xml.Xsl.IlGen.XmlILStateAnalyzer.AnalyzeContent(), System.Xml.Xsl.IlGen.XmlILConstructInfo.CallersInfo, System.Xml.Dictionary, System.Xml.Xsl.IlGen.XmlILConstructInfo.InitialStates, System.item, System.Xml.Xsl.IlGen.XmlILStateAnalyzer.parentInfo, System.Xml.Xsl.IlGen.XmlILStateAnalyzer.withinElem, System.Xml.Xsl.IlGen.XmlILConstructInfo.Write(), and System.Xml.Xsl.IlGen.XmlILStateAnalyzer.xstates.

Referenced by System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitAttributeCtor(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitChoice(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitCommentCtor(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitDocumentCtor(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitNamespaceDecl(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitPICtor(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitQilExpression(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitRawTextCtor(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitRtfCtor(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitTextCtor(), System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitXsltCopy(), and System.Xml.Xsl.IlGen.XmlILOptimizerVisitor.VisitXsltCopyOf().