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>
diff --git a/src/sksl/lex/Main.cpp b/src/sksl/lex/Main.cpp
index 68c97f0..9a30b8b 100644
--- a/src/sksl/lex/Main.cpp
+++ b/src/sksl/lex/Main.cpp
@@ -149,7 +149,8 @@
out << " if (!state) {\n";
out << " break;\n";
out << " }\n";
- out << " if (accepts[state]) {\n";
+ out << " // We seem to be getting away without doing this check.\n";
+ out << " /*if (accepts[state] != -1)*/ {\n";
out << " lastAccept = (" << token << "::Kind) accepts[state];\n";
out << " lastAcceptEnd = offset;\n";
out << " }\n";