~ubuntu-branches/ubuntu/trusty/protobuf/trusty-proposed

« back to all changes in this revision

Viewing changes to src/google/protobuf/io/tokenizer.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2011-05-31 14:41:47 UTC
  • mfrom: (2.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20110531144147-s41g5fozgvyo462l
Tags: 2.4.0a-2ubuntu1
* Merge with Debian; remaining changes:
  - Fix linking with -lpthread.

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
    // the token within the input stream.  They are zero-based.
123
123
    int line;
124
124
    int column;
 
125
    int end_column;
125
126
  };
126
127
 
127
128
  // Get the current token.  This is updated when Next() is called.  Before
128
129
  // the first call to Next(), current() has type TYPE_START and no contents.
129
130
  const Token& current();
130
131
 
 
132
  // Return the previous token -- i.e. what current() returned before the
 
133
  // previous call to Next().
 
134
  const Token& previous();
 
135
 
131
136
  // Advance to the next token.  Returns false if the end of the input is
132
137
  // reached.
133
138
  bool Next();
180
185
  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Tokenizer);
181
186
 
182
187
  Token current_;           // Returned by current().
 
188
  Token previous_;          // Returned by previous().
183
189
 
184
190
  ZeroCopyInputStream* input_;
185
191
  ErrorCollector* error_collector_;
291
297
  return current_;
292
298
}
293
299
 
 
300
inline const Tokenizer::Token& Tokenizer::previous() {
 
301
  return previous_;
 
302
}
 
303
 
294
304
inline void Tokenizer::ParseString(const string& text, string* output) {
295
305
  output->clear();
296
306
  ParseStringAppend(text, output);