Skip to content

Commit 41aa1ca

Browse files
neildharfacebook-github-bot
authored andcommitted
Rename Compiler.h to Regex.h
Summary: Now that `Compiler.h` only contains the `Regex` class, rename it to `Regex.h`. This makes the purpose of the file clearer and avoids confusion with the other `Compiler.h`. This change also modifies files that include `Regex.h` so that they only include the header files they actually need. Reviewed By: avp Differential Revision: D22035155 fbshipit-source-id: 68a1c9381203d2b160cf8d10e723a13f8b94b9e6
1 parent 6df188f commit 41aa1ca

9 files changed

Lines changed: 10 additions & 6 deletions

File tree

include/hermes/Regex/Executor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#ifndef HERMES_REGEX_EXECUTOR_H
99
#define HERMES_REGEX_EXECUTOR_H
1010

11-
#include "hermes/Regex/Compiler.h"
11+
#include "hermes/Regex/RegexBytecode.h"
12+
#include "hermes/Regex/RegexTypes.h"
1213

1314
// This file contains the machinery for executing a regexp compiled to bytecode.
1415

include/hermes/Regex/RegexTraits.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
#include "hermes/Platform/Unicode/CharacterProperties.h"
1717
#include "hermes/Platform/Unicode/PlatformUnicode.h"
18-
#include "hermes/Regex/Compiler.h"
18+
#include "hermes/Regex/RegexBytecode.h"
19+
#include "hermes/Regex/RegexTypes.h"
1920
#include "llvm/ADT/DenseMap.h"
2021
#include "llvm/ADT/Optional.h"
2122

include/hermes/VM/JSRegExp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef HERMES_VM_JSREGEXP_H
99
#define HERMES_VM_JSREGEXP_H
1010

11-
#include "hermes/Regex/Compiler.h"
11+
#include "hermes/Regex/RegexTypes.h"
1212
#include "hermes/VM/JSObject.h"
1313
#include "hermes/VM/RegExpMatch.h"
1414
#include "hermes/VM/SmallXString.h"

lib/Regex/RegexParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "hermes/Platform/Unicode/CharacterProperties.h"
99
#include "hermes/Platform/Unicode/CodePointSet.h"
1010

11-
#include "hermes/Regex/Compiler.h"
11+
#include "hermes/Regex/Regex.h"
1212
#include "hermes/Regex/RegexTraits.h"
1313
#include "llvm/Support/SaveAndRestore.h"
1414
namespace hermes {

lib/Support/RegExpSerialization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#include "hermes/Support/RegExpSerialization.h"
9-
#include "hermes/Regex/Compiler.h"
9+
#include "hermes/Regex/Regex.h"
1010
#include "hermes/Regex/RegexTraits.h"
1111
#include "hermes/Support/Algorithms.h"
1212
#include "hermes/Support/UTF8.h"

lib/VM/JSLib/JSLibInternal.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "JSLibInternal.h"
99

1010
#include "hermes/Regex/Executor.h"
11+
#include "hermes/Regex/Regex.h"
1112
#include "hermes/Regex/RegexTraits.h"
1213
#include "hermes/VM/Runtime.h"
1314
#include "hermes/VM/StringBuilder.h"

lib/VM/JSRegExp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "hermes/VM/JSRegExp.h"
99

1010
#include "hermes/Regex/Executor.h"
11+
#include "hermes/Regex/Regex.h"
1112
#include "hermes/Regex/RegexTraits.h"
1213
#include "hermes/Support/UTF8.h"
1314
#include "hermes/VM/BuildMetadata.h"

unittests/Support/RegexTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
#include "hermes/Regex/Compiler.h"
8+
#include "hermes/Regex/Regex.h"
99
#include "hermes/Regex/Executor.h"
1010
#include "hermes/Regex/RegexTraits.h"
1111

0 commit comments

Comments
 (0)