Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: tools/gn/token.h

Issue 591373002: gn: start of format command (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-more-comment-stuff
Patch Set: change 'copyright header block' to 'standard header block' for android_webview/tools/check_licenses… Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/parser_unittest.cc ('k') | tools/gn/tokenizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « tools/gn/parser_unittest.cc ('k') | tools/gn/tokenizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698