diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 21:03:28 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 21:03:28 +0000 |
commit | 7aad59997d99adfcf7c5defaccbb04a631e03f15 (patch) | |
tree | 2166b870febeb68116c66dc11a7b1db64fa31521 /tools/gn | |
parent | 61ac9e2412b2915150f89d5b5bfafcf2e143af52 (diff) | |
download | chromium_src-7aad59997d99adfcf7c5defaccbb04a631e03f15.zip chromium_src-7aad59997d99adfcf7c5defaccbb04a631e03f15.tar.gz chromium_src-7aad59997d99adfcf7c5defaccbb04a631e03f15.tar.bz2 |
GN: Remove some dead code that was confusing.
BUG=354626
R=brettw@chromium.org
Review URL: https://codereview.chromium.org/202733003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn')
-rw-r--r-- | tools/gn/token.cc | 26 | ||||
-rw-r--r-- | tools/gn/token.h | 4 |
2 files changed, 0 insertions, 30 deletions
diff --git a/tools/gn/token.cc b/tools/gn/token.cc index ba59526..70ce2a1 100644 --- a/tools/gn/token.cc +++ b/tools/gn/token.cc @@ -6,25 +6,6 @@ #include "base/logging.h" -namespace { - -std::string UnescapeString(const base::StringPiece& input) { - std::string result; - result.reserve(input.size()); - - for (size_t i = 0; i < input.size(); i++) { - if (input[i] == '\\') { - DCHECK(i < input.size() - 1); // Last char shouldn't be a backslash or - // it would have escaped the terminator. - i++; // Skip backslash, next char is a literal. - } - result.push_back(input[i]); - } - return result; -} - -} // namespace - Token::Token() : type_(INVALID), value_() { } @@ -43,10 +24,3 @@ bool Token::IsIdentifierEqualTo(const char* v) const { bool Token::IsStringEqualTo(const char* v) const { return type_ == STRING && value_ == v; } - -std::string Token::StringValue() const { - DCHECK(type() == STRING); - - // Trim off the string terminators at the end. - return UnescapeString(value_.substr(1, value_.size() - 2)); -} diff --git a/tools/gn/token.h b/tools/gn/token.h index 25f176b..15f9195 100644 --- a/tools/gn/token.h +++ b/tools/gn/token.h @@ -68,10 +68,6 @@ class Token { bool IsIdentifierEqualTo(const char* v) const; bool IsStringEqualTo(const char* v) const; - // For STRING tokens, returns the string value (no quotes at end, does - // unescaping). - std::string StringValue() const; - private: Type type_; base::StringPiece value_; |