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

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

Issue 583363003: GN: Fix dependency output file handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | tools/gn/substitution_pattern.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 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_SUBSTITUTION_PATTERN_H_ 5 #ifndef TOOLS_GN_SUBSTITUTION_PATTERN_H_
6 #define TOOLS_GN_SUBSTITUTION_PATTERN_H_ 6 #define TOOLS_GN_SUBSTITUTION_PATTERN_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 }; 34 };
35 35
36 SubstitutionPattern(); 36 SubstitutionPattern();
37 ~SubstitutionPattern(); 37 ~SubstitutionPattern();
38 38
39 // Parses the given string and fills in the pattern. The pattern must only 39 // Parses the given string and fills in the pattern. The pattern must only
40 // be initialized once. On failure, returns false and sets the error. 40 // be initialized once. On failure, returns false and sets the error.
41 bool Parse(const Value& value, Err* err); 41 bool Parse(const Value& value, Err* err);
42 bool Parse(const std::string& str, const ParseNode* origin, Err* err); 42 bool Parse(const std::string& str, const ParseNode* origin, Err* err);
43 43
44 // Makes a pattern given a hardcoded string. Will assert if the string is
45 // not a valid pattern.
46 static SubstitutionPattern MakeForTest(const char* str);
47
44 // Returns the pattern as a string with substitutions in them. 48 // Returns the pattern as a string with substitutions in them.
45 std::string AsString() const; 49 std::string AsString() const;
46 50
47 // Sets the bits in the given vector corresponding to the substitutions used 51 // Sets the bits in the given vector corresponding to the substitutions used
48 // by this pattern. SUBSTITUTION_LITERAL is ignored. 52 // by this pattern. SUBSTITUTION_LITERAL is ignored.
49 void FillRequiredTypes(SubstitutionBits* bits) const; 53 void FillRequiredTypes(SubstitutionBits* bits) const;
50 54
51 // Checks whether this pattern resolves to something in the output directory 55 // Checks whether this pattern resolves to something in the output directory
52 // for the given build settings. If not, returns false and fills in the given 56 // for the given build settings. If not, returns false and fills in the given
53 // error. 57 // error.
(...skipping 10 matching lines...) Expand all
64 bool empty() const { return ranges_.empty(); } 68 bool empty() const { return ranges_.empty(); }
65 69
66 private: 70 private:
67 std::vector<Subrange> ranges_; 71 std::vector<Subrange> ranges_;
68 const ParseNode* origin_; 72 const ParseNode* origin_;
69 73
70 std::vector<SubstitutionType> required_types_; 74 std::vector<SubstitutionType> required_types_;
71 }; 75 };
72 76
73 #endif // TOOLS_GN_SUBSTITUTION_PATTERN_H_ 77 #endif // TOOLS_GN_SUBSTITUTION_PATTERN_H_
OLDNEW
« no previous file with comments | « no previous file | tools/gn/substitution_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698