summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/MarkupGenerator.cpp
diff options
context:
space:
mode:
authorMatthew Olsson <matthewcolsson@gmail.com>2020-06-03 16:05:49 -0700
committerAndreas Kling <kling@serenityos.org>2020-06-07 19:06:55 +0200
commit61ac1d3ffa1adb3df7d8787d78eab2399352a942 (patch)
treeffa909a56037203cee3f7b788bb41835df1c3964 /Libraries/LibJS/MarkupGenerator.cpp
parent984a6ff97b3cceca94d0b8c502ef072e7e35dfb0 (diff)
downloadserenity-61ac1d3ffa1adb3df7d8787d78eab2399352a942.zip
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!
Diffstat (limited to 'Libraries/LibJS/MarkupGenerator.cpp')
-rw-r--r--Libraries/LibJS/MarkupGenerator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibJS/MarkupGenerator.cpp b/Libraries/LibJS/MarkupGenerator.cpp
index 6efaf65855..8836c7b069 100644
--- a/Libraries/LibJS/MarkupGenerator.cpp
+++ b/Libraries/LibJS/MarkupGenerator.cpp
@@ -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: