v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8-regex.h
Go to the documentation of this file.
1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_INSPECTOR_V8_REGEX_H_
6#define V8_INSPECTOR_V8_REGEX_H_
7
9#include "src/base/macros.h"
11
12namespace v8 {
13class RegExp;
14}
15
16namespace v8_inspector {
17
18class V8InspectorImpl;
19
21
22class V8Regex {
23 public:
24 V8Regex(V8InspectorImpl*, const String16&, bool caseSensitive,
25 bool multiline = false);
26 V8Regex(const V8Regex&) = delete;
27 V8Regex& operator=(const V8Regex&) = delete;
28 int match(const String16&, int startFrom = 0,
29 int* matchLength = nullptr) const;
30 bool isValid() const { return !m_regex.IsEmpty(); }
31 const String16& errorMessage() const { return m_errorMessage; }
32
33 private:
37};
38
39} // namespace v8_inspector
40
41#endif // V8_INSPECTOR_V8_REGEX_H_
V8Regex(V8InspectorImpl *, const String16 &, bool caseSensitive, bool multiline=false)
Definition v8-regex.cc:20
v8::Global< v8::RegExp > m_regex
Definition v8-regex.h:35
String16 m_errorMessage
Definition v8-regex.h:36
V8Regex & operator=(const V8Regex &)=delete
int match(const String16 &, int startFrom=0, int *matchLength=nullptr) const
Definition v8-regex.cc:51
V8InspectorImpl * m_inspector
Definition v8-regex.h:34
bool isValid() const
Definition v8-regex.h:30
const String16 & errorMessage() const
Definition v8-regex.h:31
V8Regex(const V8Regex &)=delete
@ MultilineEnabled
Definition v8-regex.h:20
@ MultilineDisabled
Definition v8-regex.h:20