| 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_TOKEN_H_ | 5 #ifndef TOOLS_GN_TOKEN_H_ |
| 6 #define TOOLS_GN_TOKEN_H_ | 6 #define TOOLS_GN_TOKEN_H_ |
| 7 | 7 |
| 8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
| 9 #include "tools/gn/location.h" | 9 #include "tools/gn/location.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 RIGHT_BRACE, | 42 RIGHT_BRACE, |
| 43 | 43 |
| 44 IF, | 44 IF, |
| 45 ELSE, | 45 ELSE, |
| 46 IDENTIFIER, // foo | 46 IDENTIFIER, // foo |
| 47 COMMA, // , | 47 COMMA, // , |
| 48 UNCLASSIFIED_COMMENT, // #...\n, of unknown style (will be converted | 48 UNCLASSIFIED_COMMENT, // #...\n, of unknown style (will be converted |
| 49 // to one below) | 49 // to one below) |
| 50 LINE_COMMENT, // #...\n on a line alone. | 50 LINE_COMMENT, // #...\n on a line alone. |
| 51 SUFFIX_COMMENT, // #...\n on a line following other code. | 51 SUFFIX_COMMENT, // #...\n on a line following other code. |
| 52 BLOCK_COMMENT, // #...\n line comment, but free-standing. |
| 52 | 53 |
| 53 UNCLASSIFIED_OPERATOR, | 54 UNCLASSIFIED_OPERATOR, |
| 54 | 55 |
| 55 NUM_TYPES | 56 NUM_TYPES |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 Token(); | 59 Token(); |
| 59 Token(const Location& location, Type t, const base::StringPiece& v); | 60 Token(const Location& location, Type t, const base::StringPiece& v); |
| 60 | 61 |
| 61 Type type() const { return type_; } | 62 Type type() const { return type_; } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 74 bool IsIdentifierEqualTo(const char* v) const; | 75 bool IsIdentifierEqualTo(const char* v) const; |
| 75 bool IsStringEqualTo(const char* v) const; | 76 bool IsStringEqualTo(const char* v) const; |
| 76 | 77 |
| 77 private: | 78 private: |
| 78 Type type_; | 79 Type type_; |
| 79 base::StringPiece value_; | 80 base::StringPiece value_; |
| 80 Location location_; | 81 Location location_; |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 #endif // TOOLS_GN_TOKEN_H_ | 84 #endif // TOOLS_GN_TOKEN_H_ |
| OLD | NEW |