diff options
author | 2018-06-28 18:04:02 -0400 | |
---|---|---|
committer | 2018-06-29 19:00:58 +0000 | |
commit | 38f118a2e7f986b06d69d0af41ec2d1af53dac39 (patch) | |
tree | 48a8b9c8b118b5f99d26a94edac8622df39fff75 /src/sksl/SkSLLexer.cpp | |
parent | 7197e05eae34dce1c65c56a92b75b29b645d0d5d (diff) |
update and skip accepts check in lexers
We think we're getting away with this because our
tokens never go from legal to illegal to legal again,
right?
Change-Id: Iaaef797f7c4b487ba7b1d0e018846bd13086b34c
Reviewed-on: https://skia-review.googlesource.com/138275
Auto-Submit: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLLexer.cpp')
-rw-r--r-- | src/sksl/SkSLLexer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sksl/SkSLLexer.cpp b/src/sksl/SkSLLexer.cpp index 44ebdcad1e..5bb970a627 100644 --- a/src/sksl/SkSLLexer.cpp +++ b/src/sksl/SkSLLexer.cpp @@ -957,7 +957,8 @@ Token Lexer::next() { if (!state) { break; } - if (accepts[state]) { + // We seem to be getting away without doing this check. + /*if (accepts[state] != -1)*/ { lastAccept = (Token::Kind)accepts[state]; lastAcceptEnd = offset; } @@ -966,4 +967,4 @@ Token Lexer::next() { return Token(lastAccept, startOffset, lastAcceptEnd - startOffset); } -} // namespace +} // namespace SkSL |