private void ScanString(char escape) { char[] text = _text; while (_pos < text.Length) { char ch = text[_pos++]; if (ch == escape && _pos < text.Length && text[_pos] == escape) { _pos++; } else if (ch == escape) { break; } } if (_pos >= text.Length) { throw ExprException.InvalidString(new string(text, _start, (_pos - 1) - _start)); } _token = Tokens.StringConst; }
private void ScanString(char escape) { char[] text = this.text; while (pos < text.Length) { char ch = text[pos++]; if (ch == escape && pos < text.Length && text[pos] == escape) { pos++; } else if (ch == escape) { break; } } if (pos >= text.Length) { throw ExprException.InvalidString(new string(text, start, (pos - 1) - start)); } token = Tokens.StringConst; }
private void ScanString(char escape) { char[] text = this.text; while (this.pos < text.Length) { char ch = text[this.pos++]; if (((ch == escape) && (this.pos < text.Length)) && (text[this.pos] == escape)) { this.pos++; } else if (ch == escape) { break; } } if (this.pos >= text.Length) { throw ExprException.InvalidString(new string(text, this.start, (this.pos - 1) - this.start)); } this.token = Tokens.StringConst; }