2
// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
3
// Use of this source code is governed by a BSD-style license that can be
4
// found in the LICENSE file.
16
location = SourceLocation();
20
bool Token::equals(const Token& other) const
22
return (type == other.type) &&
23
(flags == other.flags) &&
24
(location == other.location) &&
25
(value == other.value);
28
void Token::setAtStartOfLine(bool start)
31
flags |= AT_START_OF_LINE;
33
flags &= ~AT_START_OF_LINE;
36
void Token::setHasLeadingSpace(bool space)
39
flags |= HAS_LEADING_SPACE;
41
flags &= ~HAS_LEADING_SPACE;
44
void Token::setExpansionDisabled(bool disable)
47
flags |= EXPANSION_DISABLED;
49
flags &= ~EXPANSION_DISABLED;
52
std::ostream& operator<<(std::ostream& out, const Token& token)
54
if (token.hasLeadingSpace())