1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

LibRegex: Don't push LibRegex's "Error" into the global namespace

This commit is contained in:
Andreas Kling 2021-11-06 10:33:46 +01:00
parent af562c857e
commit a54be656ae
6 changed files with 18 additions and 20 deletions

View file

@ -34,7 +34,6 @@ class RegexStringView;
}
using regex::ECMA262Parser;
using regex::Error;
using regex::Lexer;
using regex::PosixExtendedParser;
using regex::RegexStringView;

View file

@ -81,5 +81,4 @@ inline String get_error_string(Error error)
}
}
using regex::Error;
using regex::get_error_string;

View file

@ -127,7 +127,7 @@ int main(int argc, char** argv)
options |= PosixFlags::Insensitive;
auto grep_logic = [&](auto&& re) {
if (re.parser_result.error != Error::NoError) {
if (re.parser_result.error != regex::Error::NoError) {
return 1;
}

View file

@ -32,7 +32,7 @@ int main(int argc, char** argv)
options |= PosixFlags::Insensitive;
Regex<PosixExtended> re(pattern, options);
if (re.parser_result.error != Error::NoError) {
if (re.parser_result.error != regex::Error::NoError) {
return 1;
}

View file

@ -337,7 +337,7 @@ int main(int argc, char** argv)
exclude_pattern = config->read_entry("Global", "NotTestsPattern", "$^"); // default is match nothing (aka match end then beginning)
Regex<PosixExtended> exclude_regex(exclude_pattern, {});
if (exclude_regex.parser_result.error != Error::NoError) {
if (exclude_regex.parser_result.error != regex::Error::NoError) {
warnln("Exclude pattern \"{}\" is invalid", exclude_pattern);
return 1;
}
@ -346,7 +346,7 @@ int main(int argc, char** argv)
// in the Testrunner
auto skip_regex_pattern = config->read_entry("Global", "SkipRegex", "$^");
Regex<PosixExtended> skip_regex { skip_regex_pattern, {} };
if (skip_regex.parser_result.error != Error::NoError) {
if (skip_regex.parser_result.error != regex::Error::NoError) {
warnln("SkipRegex pattern \"{}\" is invalid", skip_regex_pattern);
return 1;
}