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:
parent
27633232f4
commit
f8f1fa013f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user