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

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

Issue 962003002: gn format: Have format sort sources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 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
« tools/gn/parse_tree.cc ('K') | « tools/gn/parse_tree.cc ('k') | no next file » | 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 Location(location_.file(), 68 Location(location_.file(),
69 location_.line_number(), 69 location_.line_number(),
70 location_.char_offset() + static_cast<int>(value_.size()), 70 location_.char_offset() + static_cast<int>(value_.size()),
71 location_.byte() + static_cast<int>(value_.size()))); 71 location_.byte() + static_cast<int>(value_.size())));
72 } 72 }
73 73
74 // Helper functions for comparing this token to something. 74 // Helper functions for comparing this token to something.
75 bool IsIdentifierEqualTo(const char* v) const; 75 bool IsIdentifierEqualTo(const char* v) const;
76 bool IsStringEqualTo(const char* v) const; 76 bool IsStringEqualTo(const char* v) const;
77 77
78 void set_location(Location location) { location_ = location; }
brettw 2015/02/27 22:27:27 Seems like this should go next to location()
scottmg 2015/02/27 23:17:44 Done.
79
78 private: 80 private:
79 Type type_; 81 Type type_;
80 base::StringPiece value_; 82 base::StringPiece value_;
81 Location location_; 83 Location location_;
82 }; 84 };
83 85
84 #endif // TOOLS_GN_TOKEN_H_ 86 #endif // TOOLS_GN_TOKEN_H_
OLDNEW
« tools/gn/parse_tree.cc ('K') | « tools/gn/parse_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698