Chromium Code Reviews| Index: runtime/vm/scanner.h |
| diff --git a/runtime/vm/scanner.h b/runtime/vm/scanner.h |
| index 7558a1d0696d0e66e17c695f70ae621081673536..7a8104081f3408be2f712ef00d0fdac7eeb1f3dc 100644 |
| --- a/runtime/vm/scanner.h |
| +++ b/runtime/vm/scanner.h |
| @@ -45,7 +45,11 @@ class Scanner : ValueObject { |
| }; |
| // Dummy token index reflecting an unknown source position. |
| - static const intptr_t kNoSourcePos = 0; |
| + static const intptr_t kNoSourcePos = -1; |
| + |
| + static bool ValidSourcePosition(intptr_t token_pos) { |
|
hausner
2016/01/05 22:30:50
I'd expect ValidSourcePosition() to check whether
Cutch
2016/01/06 15:42:19
Maybe I should rename the function to be clearer.
|
| + return (token_pos >= 0) || (token_pos == kNoSourcePos); |
| + } |
| typedef ZoneGrowableArray<TokenDescriptor> GrowableTokenStream; |