Stop DSLParser from continuing after an invalid token

This matches the behavior of SkSLParser

Change-Id: Ib9af7173dda8866faf8633b8c88a8716b4e6b8d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443239
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This commit is contained in:
Ethan Nicholas 2021-08-29 14:12:17 -04:00 committed by SkCQ
parent 27633232f4
commit f8f1fa013f

View File

@ -225,6 +225,7 @@ std::unique_ptr<Program> DSLParser::program() {
case Token::Kind::TK_INVALID: {
this->nextToken();
this->error(this->peek(), String("invalid token"));
done = true;
break;
}
default: