OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_C_INCLUDE_ITERATOR_H_ | 5 #ifndef TOOLS_GN_C_INCLUDE_ITERATOR_H_ |
6 #define TOOLS_GN_C_INCLUDE_ITERATOR_H_ | 6 #define TOOLS_GN_C_INCLUDE_ITERATOR_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
10 | 12 |
11 class InputFile; | 13 class InputFile; |
12 class LocationRange; | 14 class LocationRange; |
13 | 15 |
14 // Iterates through #includes in C source and header files. | 16 // Iterates through #includes in C source and header files. |
15 // | 17 // |
16 // This only returns includes we want to check, which is user includes with | 18 // This only returns includes we want to check, which is user includes with |
17 // double-quotes: #include "..." | 19 // double-quotes: #include "..." |
(...skipping 28 matching lines...) Expand all Loading... |
46 int line_number_; // One-based. Indicates the last line we read. | 48 int line_number_; // One-based. Indicates the last line we read. |
47 | 49 |
48 // Number of lines we've processed since seeing the last include (or the | 50 // Number of lines we've processed since seeing the last include (or the |
49 // beginning of the file) with some exceptions. | 51 // beginning of the file) with some exceptions. |
50 int lines_since_last_include_; | 52 int lines_since_last_include_; |
51 | 53 |
52 DISALLOW_COPY_AND_ASSIGN(CIncludeIterator); | 54 DISALLOW_COPY_AND_ASSIGN(CIncludeIterator); |
53 }; | 55 }; |
54 | 56 |
55 #endif // TOOLS_GN_C_INCLUDE_ITERATOR_H_ | 57 #endif // TOOLS_GN_C_INCLUDE_ITERATOR_H_ |
OLD | NEW |