/// <summary> /// Just read the string between '#' signs, and parse it later /// </summary> private void ScanDate() { char[] text = _text; do { _pos++; } while (_pos < text.Length && text[_pos] != '#'); if (_pos >= text.Length || text[_pos] != '#') { // Bad date constant if (_pos >= text.Length) { throw ExprException.InvalidDate(new string(text, _start, (_pos - 1) - _start)); } else { throw ExprException.InvalidDate(new string(text, _start, _pos - _start)); } } else { _token = Tokens.Date; } _pos++; }
/// <devdoc> /// Just read the string between '#' signs, and parse it later /// </devdoc> private void ScanDate() { char[] text = this.text; do { pos++; } while (pos < text.Length && text[pos] != '#'); if (pos >= text.Length || text[pos] != '#') { // Bad date constant if (pos >= text.Length) { throw ExprException.InvalidDate(new string(text, start, (pos - 1) - start)); } else { throw ExprException.InvalidDate(new string(text, start, pos - start)); } } else { token = Tokens.Date; } pos++; }
private void ScanDate() { char[] text = this.text; do { this.pos++; }while ((this.pos < text.Length) && (text[this.pos] != '#')); if ((this.pos >= text.Length) || (text[this.pos] != '#')) { if (this.pos >= text.Length) { throw ExprException.InvalidDate(new string(text, this.start, (this.pos - 1) - this.start)); } throw ExprException.InvalidDate(new string(text, this.start, this.pos - this.start)); } this.token = Tokens.Date; this.pos++; }