v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8-regexp.h
Go to the documentation of this file.
1
// Copyright 2021 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 INCLUDE_V8_REGEXP_H_
6
#define INCLUDE_V8_REGEXP_H_
7
8
#include "
v8-local-handle.h
"
// NOLINT(build/include_directory)
9
#include "
v8-object.h
"
// NOLINT(build/include_directory)
10
#include "
v8config.h
"
// NOLINT(build/include_directory)
11
12
namespace
v8
{
13
14
class
Context;
15
19
class
V8_EXPORT
RegExp
:
public
Object
{
20
public
:
29
enum
Flags
{
30
kNone = 0,
31
kGlobal = 1 << 0,
32
kIgnoreCase = 1 << 1,
33
kMultiline = 1 << 2,
34
kSticky = 1 << 3,
35
kUnicode = 1 << 4,
36
kDotAll = 1 << 5,
37
kLinear = 1 << 6,
38
kHasIndices = 1 << 7,
39
kUnicodeSets = 1 << 8,
40
};
41
42
static
constexpr
int
kFlagCount = 9;
43
54
static
V8_WARN_UNUSED_RESULT
MaybeLocal<RegExp>
New(
Local<Context>
context,
55
Local<String>
pattern
,
56
Flags
flags);
57
63
static
V8_WARN_UNUSED_RESULT
MaybeLocal<RegExp>
NewWithBacktrackLimit(
64
Local<Context>
context,
Local<String>
pattern
,
Flags
flags,
65
uint32_t backtrack_limit);
66
78
V8_WARN_UNUSED_RESULT
MaybeLocal<Object>
Exec(
Local<Context>
context,
79
Local<String>
subject);
80
85
Local<String>
GetSource()
const
;
86
90
Flags
GetFlags()
const
;
91
92
V8_INLINE
static
RegExp
*
Cast
(
Value
* value) {
93
#ifdef V8_ENABLE_CHECKS
94
CheckCast(value);
95
#endif
96
return
static_cast<
RegExp
*
>
(
value
);
97
}
98
99
private
:
100
static
void
CheckCast(
Value
* obj);
101
};
102
103
}
// namespace v8
104
105
#endif
// INCLUDE_V8_REGEXP_H_
v8::Local
Definition
v8-local-handle.h:267
v8::MaybeLocal
Definition
v8-local-handle.h:635
v8::Object
Definition
v8-object.h:233
v8::RegExp
Definition
v8-regexp.h:19
v8::RegExp::Cast
static V8_INLINE RegExp * Cast(Value *value)
Definition
v8-regexp.h:92
v8::RegExp::Flags
Flags
Definition
v8-regexp.h:29
v8::Value
Definition
v8-value.h:32
pattern
std::string pattern
Definition
js-date-time-format.cc:123
v8
Definition
api-arguments-inl.h:19
v8-local-handle.h
v8-object.h
v8config.h
V8_EXPORT
#define V8_EXPORT
Definition
v8config.h:800
V8_INLINE
#define V8_INLINE
Definition
v8config.h:500
V8_WARN_UNUSED_RESULT
#define V8_WARN_UNUSED_RESULT
Definition
v8config.h:671
value
std::unique_ptr< ValueMirror > value
Definition
value-mirror.cc:950
include
v8-regexp.h
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0