1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

LibJS: Lex and parse regex literals, add RegExp objects

This adds regex parsing/lexing, as well as a relatively empty
RegExpObject. The purpose of this patch is to allow the engine to not
get hung up on parsing regexes. This will aid in finding new syntax
errors (say, from google or twitter) without having to replace all of
their regexes first!
This commit is contained in:
Matthew Olsson 2020-06-03 16:05:49 -07:00 committed by Andreas Kling
parent 984a6ff97b
commit 61ac1d3ffa
20 changed files with 424 additions and 5 deletions

View file

@ -223,6 +223,7 @@ MarkupGenerator::StyleType MarkupGenerator::style_type_for_token(Token token)
case TokenType::TemplateLiteralEnd:
case TokenType::TemplateLiteralString:
case TokenType::RegexLiteral:
case TokenType::RegexFlags:
case TokenType::UnterminatedStringLiteral:
return StyleType::String;
case TokenType::BracketClose: