summaryrefslogtreecommitdiff
path: root/js/src/regexp/regexp-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/regexp/regexp-parser.h')
-rw-r--r--js/src/regexp/regexp-parser.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/js/src/regexp/regexp-parser.h b/js/src/regexp/regexp-parser.h
index 91677d6c35..131d12161f 100644
--- a/js/src/regexp/regexp-parser.h
+++ b/js/src/regexp/regexp-parser.h
@@ -6,6 +6,7 @@
#define V8_REGEXP_REGEXP_PARSER_H_
#include "regexp/regexp-ast.h"
+#include "regexp/regexp-error.h"
namespace v8 {
namespace internal {
@@ -150,8 +151,8 @@ class RegExpBuilder : public ZoneObject {
class V8_EXPORT_PRIVATE RegExpParser {
public:
- RegExpParser(FlatStringReader* in, Handle<String>* error,
- JSRegExp::Flags flags, Isolate* isolate, Zone* zone);
+ RegExpParser(FlatStringReader* in, JSRegExp::Flags flags, Isolate* isolate,
+ Zone* zone);
static bool ParseRegExp(Isolate* isolate, Zone* zone, FlatStringReader* input,
JSRegExp::Flags flags, RegExpCompileData* result);
@@ -174,13 +175,13 @@ class V8_EXPORT_PRIVATE RegExpParser {
bool ParseUnicodeEscape(uc32* value);
bool ParseUnlimitedLengthHexNumber(int max_value, uc32* value);
- bool ParsePropertyClassName(std::vector<char>* name_1,
- std::vector<char>* name_2);
+ bool ParsePropertyClassName(ZoneVector<char>* name_1,
+ ZoneVector<char>* name_2);
bool AddPropertyClassRange(ZoneList<CharacterRange>* add_to, bool negate,
- const std::vector<char>& name_1,
- const std::vector<char>& name_2);
+ const ZoneVector<char>& name_1,
+ const ZoneVector<char>& name_2);
- RegExpTree* GetPropertySequence(const std::vector<char>& name_1);
+ RegExpTree* GetPropertySequence(const ZoneVector<char>& name_1);
RegExpTree* ParseCharacterClass(const RegExpBuilder* state);
uc32 ParseOctalLiteral();
@@ -199,7 +200,7 @@ class V8_EXPORT_PRIVATE RegExpParser {
char ParseClassEscape();
- RegExpTree* ReportError(Vector<const char> message);
+ RegExpTree* ReportError(RegExpError error);
void Advance();
void Advance(int dist);
void Reset(int pos);
@@ -332,7 +333,8 @@ class V8_EXPORT_PRIVATE RegExpParser {
Isolate* isolate_;
Zone* zone_;
- Handle<String>* error_;
+ RegExpError error_ = RegExpError::kNone;
+ int error_pos_ = 0;
ZoneList<RegExpCapture*>* captures_;
ZoneSet<RegExpCapture*, RegExpCaptureNameLess>* named_captures_;
ZoneList<RegExpBackReference*>* named_back_references_;