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

◆ ScanName() [2/2]

void System.Data.ExpressionParser.ScanName ( char chEnd,
char esc,
string charsToEscape )
inlineprivate

Definition at line 730 of file ExpressionParser.cs.

731 {
732 char[] text = _text;
733 do
734 {
735 if (text[_pos] == esc && _pos + 1 < text.Length && charsToEscape.Contains(text[_pos + 1]))
736 {
737 _pos++;
738 }
739 _pos++;
740 }
741 while (_pos < text.Length && text[_pos] != chEnd);
742 if (_pos >= text.Length)
743 {
744 throw ExprException.InvalidNameBracketing(new string(text, _start, _pos - 1 - _start));
745 }
746 _pos++;
747 _token = Tokens.Name;
748 }

References System.Data.ExpressionParser._pos, System.Data.ExpressionParser._start, System.Data.ExpressionParser._text, System.Data.ExpressionParser._token, System.Data.ExprException.InvalidNameBracketing(), and System.text.