Roll src/third_party/skia ff271c2:b679ca8
[chromium-blink-merge.git] / tools / gn / token.cc
blob70ce2a1719de9aed20df4a5cc72f3a2870d6f642
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
3 // found in the LICENSE file.
5 #include "tools/gn/token.h"
7 #include "base/logging.h"
9 Token::Token() : type_(INVALID), value_() {
12 Token::Token(const Location& location,
13 Type t,
14 const base::StringPiece& v)
15 : type_(t),
16 value_(v),
17 location_(location) {
20 bool Token::IsIdentifierEqualTo(const char* v) const {
21 return type_ == IDENTIFIER && value_ == v;
24 bool Token::IsStringEqualTo(const char* v) const {
25 return type_ == STRING && value_ == v;