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

◆ ParseName()

static string System.Data.NameNode.ParseName ( char[] text,
int start,
int pos )
inlinestaticpackage

Definition at line 150 of file NameNode.cs.

151 {
152 char c = '\0';
153 string text2 = string.Empty;
154 int num = start;
155 int num2 = pos;
156 checked
157 {
158 if (text[start] == '`')
159 {
160 start++;
161 pos--;
162 c = '\\';
163 text2 = "`";
164 }
165 else if (text[start] == '[')
166 {
167 start++;
168 pos--;
169 c = '\\';
170 text2 = "]\\";
171 }
172 }
173 if (c != 0)
174 {
175 int num3 = start;
176 for (int i = start; i < pos; i++)
177 {
178 if (text[i] == c && i + 1 < pos && text2.Contains(text[i + 1]))
179 {
180 i++;
181 }
182 text[num3] = text[i];
183 num3++;
184 }
185 pos = num3;
186 }
187 if (pos == start)
188 {
189 throw ExprException.InvalidName(new string(text, num, num2 - num));
190 }
191 return new string(text, start, pos - start);
192 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)

References System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), System.Data.ExprException.InvalidName(), System.start, and System.text.

Referenced by System.Data.NameNode.NameNode(), System.Data.ExpressionParser.Parse(), and System.Data.ExpressionParser.ParseAggregateArgument().