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

◆ ParseEntityDecl()

void System.Xml.DtdParser.ParseEntityDecl ( )
inlineprivate

Definition at line 1014 of file DtdParser.cs.

1015 {
1016 bool flag = false;
1018 Token token = GetToken(needWhiteSpace: true);
1019 if (token == Token.Name)
1020 {
1021 goto IL_002c;
1022 }
1023 if (token == Token.Percent)
1024 {
1025 flag = true;
1026 if (GetToken(needWhiteSpace: true) == Token.Name)
1027 {
1028 goto IL_002c;
1029 }
1030 }
1031 goto IL_01d6;
1032 IL_002c:
1037 if (flag)
1038 {
1040 {
1042 }
1043 }
1045 {
1047 }
1051 if ((uint)(token2 - 33) > 1u)
1052 {
1053 if (token2 != Token.Literal)
1054 {
1055 goto IL_01d6;
1056 }
1060 }
1061 else
1062 {
1063 ParseExternalId(token2, Token.EntityDecl, out var publicId, out var systemId);
1065 schemaEntity.Url = systemId;
1066 schemaEntity.Pubid = publicId;
1067 if (GetToken(needWhiteSpace: false) == Token.NData)
1068 {
1069 if (flag)
1070 {
1071 ThrowUnexpectedToken(_curPos - 5, ">");
1072 }
1073 if (!_whitespaceSeen)
1074 {
1076 }
1077 if (GetToken(needWhiteSpace: true) != Token.Name)
1078 {
1079 goto IL_01d6;
1080 }
1082 string name = schemaEntity.NData.Name;
1084 {
1086 }
1087 }
1088 }
1090 {
1092 return;
1093 }
1094 goto IL_01d6;
1095 IL_01d6:
1097 }
void Add(TKey key, TValue value)
static string Xml_ExpectingWhiteSpace
Definition SR.cs:66
Definition SR.cs:7
void AddUndeclaredNotation(string notationName)
void Throw(int curPos, string res)
XmlQualifiedName GetNameQualified(bool canHavePrefix)
LineInfo _literalLineInfo
Definition DtdParser.cs:192
Token GetToken(bool needWhiteSpace)
void ThrowUnexpectedToken(int pos, string expectedToken)
void ParseExternalId(Token idTokenType, Token declType, out string publicId, out string systemId)
SchemaInfo _schemaInfo
Definition DtdParser.cs:146
Dictionary< XmlQualifiedName, SchemaEntity > GeneralEntities
Definition SchemaInfo.cs:60
Dictionary< string, SchemaNotation > Notations
Dictionary< XmlQualifiedName, SchemaEntity > ParameterEntities
Definition SchemaInfo.cs:72

References System.Xml.DtdParser._curPos, System.Xml.DtdParser._documentBaseUri, System.Xml.DtdParser._externalDtdBaseUri, System.Xml.DtdParser._literalLineInfo, System.Xml.DtdParser._schemaInfo, System.Xml.DtdParser._whitespaceSeen, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.DtdParser.AddUndeclaredNotation(), System.Xml.DtdParser.BaseUriStr, System.Collections.Generic.Dictionary< TKey, TValue >.ContainsKey(), System.Xml.Dictionary, System.Xml.Schema.SchemaInfo.GeneralEntities, System.Xml.DtdParser.GetNameQualified(), System.Xml.DtdParser.GetToken(), System.Xml.DtdParser.GetValue(), System.Xml.LineInfo.lineNo, System.Xml.LineInfo.linePos, System.Xml.Schema.SchemaInfo.Notations, System.Xml.DtdParser.OnUnexpectedError(), System.Xml.Schema.SchemaInfo.ParameterEntities, System.Xml.DtdParser.ParseExternalId(), System.Xml.DtdParser.ParsingInternalSubset, System.Xml.DtdParser.Throw(), System.Xml.DtdParser.ThrowUnexpectedToken(), and System.SR.Xml_ExpectingWhiteSpace.

Referenced by System.Xml.DtdParser.ParseSubset().