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

◆ ParseStepPattern()

QilNode System.Xml.Xsl.Xslt.XPathPatternParser.ParseStepPattern ( )
inlineprivate

Definition at line 138 of file XPathPatternParser.cs.

139 {
141 switch (_scanner.Kind)
142 {
143 case LexKind.DotDot:
144 case LexKind.Dot:
146 case LexKind.At:
147 xPathAxis = XPathAxis.Attribute;
149 break;
150 case LexKind.Axis:
152 if (xPathAxis != XPathAxis.Child && xPathAxis != XPathAxis.Attribute)
153 {
155 }
158 break;
159 case LexKind.Name:
160 case LexKind.Star:
161 xPathAxis = XPathAxis.Child;
162 break;
163 default:
165 }
166 XPathParser<QilNode>.InternalParseNodeTest(_scanner, xPathAxis, out var nodeType, out var nodePrefix, out var nodeName);
168 if (_ptrnBuilder is XPathPatternBuilder xPathPatternBuilder)
169 {
171 while (_scanner.Kind == LexKind.LBracket)
172 {
174 }
175 if (list.Count > 0)
176 {
177 qilNode = xPathPatternBuilder.BuildPredicates(qilNode, list);
178 }
179 }
180 else
181 {
182 while (_scanner.Kind == LexKind.LBracket)
183 {
185 }
186 }
187 return qilNode;
188 }
static string XPath_InvalidAxisInPattern
Definition SR.cs:1840
static string XPath_UnexpectedToken
Definition SR.cs:1832
Definition SR.cs:7
XPathCompileException CreateException(string resId, params string[] args)
Node Axis(XPathAxis xpathAxis, XPathNodeType nodeType, string prefix, string name)
Node Predicate(Node node, Node condition, bool reverseStep)

References System.Xml.Xsl.Xslt.XPathPatternParser._ptrnBuilder, System.Xml.Xsl.Xslt.XPathPatternParser._scanner, System.Xml.Xsl.XPath.IXPathBuilder< Node >.Axis(), System.Xml.Xsl.XPath.XPathScanner.Axis, System.Xml.Xsl.XPath.XPathScanner.CreateException(), System.Xml.Dictionary, System.Xml.Xsl.XPath.XPathScanner.Kind, System.list, System.Xml.Xsl.XPath.XPathScanner.NextLex(), System.Xml.Xsl.Xslt.XPathPatternParser.ParsePredicate(), System.Xml.Xsl.XPath.IXPathBuilder< Node >.Predicate(), System.Xml.Xsl.XPath.XPathScanner.RawValue, System.SR.XPath_InvalidAxisInPattern, and System.SR.XPath_UnexpectedToken.

Referenced by System.Xml.Xsl.Xslt.XPathPatternParser.ParseRelativePathPattern().