OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_GN_TOKENIZER_H_ | 5 #ifndef TOOLS_GN_TOKENIZER_H_ |
6 #define TOOLS_GN_TOKENIZER_H_ | 6 #define TOOLS_GN_TOKENIZER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "tools/gn/err.h" | 13 #include "tools/gn/err.h" |
14 #include "tools/gn/token.h" | 14 #include "tools/gn/token.h" |
15 | 15 |
16 class InputFile; | 16 class InputFile; |
17 | 17 |
18 class Tokenizer { | 18 class Tokenizer { |
19 public: | 19 public: |
20 static std::vector<Token> Tokenize(const InputFile* input_file, Err* err); | 20 static std::vector<Token> Tokenize(const InputFile* input_file, Err* err); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 Err* err_; | 85 Err* err_; |
86 size_t cur_; // Byte offset into input buffer. | 86 size_t cur_; // Byte offset into input buffer. |
87 | 87 |
88 int line_number_; | 88 int line_number_; |
89 int char_in_line_; | 89 int char_in_line_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(Tokenizer); | 91 DISALLOW_COPY_AND_ASSIGN(Tokenizer); |
92 }; | 92 }; |
93 | 93 |
94 #endif // TOOLS_GN_TOKENIZER_H_ | 94 #endif // TOOLS_GN_TOKENIZER_H_ |
OLD | NEW |