1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:58:13 +00:00

LibJS+LibGUI+js: Handle UnterminatedRegexLiteral in syntax highlighters

This commit is contained in:
Linus Groh 2020-09-25 20:56:28 +01:00 committed by Andreas Kling
parent 43b2928688
commit 7d83665635
3 changed files with 4 additions and 1 deletions

View file

@ -226,6 +226,7 @@ MarkupGenerator::StyleType MarkupGenerator::style_type_for_token(Token token)
case TokenType::RegexLiteral:
case TokenType::RegexFlags:
case TokenType::UnterminatedStringLiteral:
case TokenType::UnterminatedRegexLiteral:
return StyleType::String;
case TokenType::BracketClose:
case TokenType::BracketOpen:
@ -330,7 +331,7 @@ MarkupGenerator::StyleType MarkupGenerator::style_type_for_token(Token token)
case TokenType::Identifier:
return StyleType::Identifier;
default:
dbg() << "Unknown style type for token" << token.name();
dbg() << "Unknown style type for token " << token.name();
ASSERT_NOT_REACHED();
}
}