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

◆ getXPathLex()

static void System.Xml.Xsl.XsltOld.Compiler.getXPathLex ( string avt,
ref int start,
StringBuilder lex )
inlinestaticprivate

Definition at line 680 of file Compiler.cs.

681 {
682 int length = avt.Length;
683 int num = 0;
684 for (int i = start + 1; i < length; i++)
685 {
686 char c = avt[i];
687 switch (num)
688 {
689 case 0:
690 switch (c)
691 {
692 case '{':
693 throw XsltException.Create(System.SR.Xslt_NestedAvt, avt);
694 case '}':
695 i++;
696 if (i == start + 2)
697 {
698 throw XsltException.Create(System.SR.Xslt_EmptyAvtExpr, avt);
699 }
700 lex.Append(avt, start + 1, i - start - 2);
701 start = i;
702 return;
703 case '\'':
704 num = 1;
705 break;
706 case '"':
707 num = 2;
708 break;
709 }
710 break;
711 case 1:
712 if (c == '\'')
713 {
714 num = 0;
715 }
716 break;
717 case 2:
718 if (c == '"')
719 {
720 num = 0;
721 }
722 break;
723 }
724 }
725 throw XsltException.Create((num == 0) ? System.SR.Xslt_OpenBracesAvt : System.SR.Xslt_OpenLiteralAvt, avt);
726 }
static string Xslt_OpenBracesAvt
Definition SR.cs:2082
static string Xslt_EmptyAvtExpr
Definition SR.cs:2088
static string Xslt_NestedAvt
Definition SR.cs:2086
Definition SR.cs:7

References System.Xml.Xsl.XsltException.Create(), System.Xml.Dictionary, System.length, System.start, System.SR.Xslt_EmptyAvtExpr, System.SR.Xslt_NestedAvt, System.SR.Xslt_OpenBracesAvt, and System.SR.Xslt_OpenLiteralAvt.