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

◆ CheckOperator()

bool System.Xml.Xsl.XPath.XPathScanner.CheckOperator ( bool star)
inlineprivate

Definition at line 311 of file XPathScanner.cs.

312 {
313 LexKind kind;
314 if (star)
315 {
316 kind = LexKind.Multiply;
317 }
318 else
319 {
320 if (_prefix.Length != 0 || _name.Length > 3)
321 {
322 return false;
323 }
324 switch (_name)
325 {
326 case "or":
327 kind = LexKind.Or;
328 break;
329 case "and":
330 kind = LexKind.And;
331 break;
332 case "div":
333 kind = LexKind.Divide;
334 break;
335 case "mod":
336 kind = LexKind.Modulo;
337 break;
338 default:
339 return false;
340 }
341 }
342 if (_prevKind <= LexKind.Union)
343 {
344 return false;
345 }
346 switch (_prevKind)
347 {
348 case LexKind.ColonColon:
349 case LexKind.SlashSlash:
350 case LexKind.Dollar:
351 case LexKind.LParens:
352 case LexKind.Comma:
353 case LexKind.Slash:
354 case LexKind.At:
355 case LexKind.LBracket:
356 return false;
357 default:
358 _kind = kind;
359 return true;
360 }
361 }

References System.Xml.Xsl.XPath.XPathScanner._kind, System.Xml.Xsl.XPath.XPathScanner._name, System.Xml.Xsl.XPath.XPathScanner._prefix, and System.Xml.Xsl.XPath.XPathScanner._prevKind.

Referenced by System.Xml.Xsl.XPath.XPathScanner.NextLex().