OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SKSL_TOKEN | 8 #ifndef SKSL_TOKEN |
9 #define SKSL_TOKEN | 9 #define SKSL_TOKEN |
10 | 10 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 Token() { | 150 Token() { |
151 } | 151 } |
152 | 152 |
153 Token(Position position, Kind kind, std::string text) | 153 Token(Position position, Kind kind, std::string text) |
154 : fPosition(position) | 154 : fPosition(position) |
155 , fKind(kind) | 155 , fKind(kind) |
156 , fText(std::move(text)) {} | 156 , fText(std::move(text)) {} |
157 | 157 |
158 Position fPosition; | 158 Position fPosition; |
159 Kind fKind; | 159 Kind fKind; |
| 160 // will be the empty string unless the token has variable text content (iden
tifiers, numeric |
| 161 // literals, and directives) |
160 std::string fText; | 162 std::string fText; |
161 }; | 163 }; |
162 | 164 |
163 } // namespace | 165 } // namespace |
164 #endif | 166 #endif |
OLD | NEW |