Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qv4regexpobject.cpp File Reference
#include "qv4regexpobject_p.h"
#include "qv4regexp_p.h"
#include <private/qv4mm_p.h>
#include "qv4scopedvalue_p.h"
#include "qv4jscall_p.h"
#include "qv4symbol_p.h"
#include "private/qlocale_tools_p.h"
#include <QtCore/QDebug>
#include <cassert>
#include <typeinfo>
#include <iostream>
#include <private/qv4alloca_p.h>
+ Include dependency graph for qv4regexpobject.cpp:

Go to the source code of this file.

Functions

 DEFINE_OBJECT_VTABLE (RegExpObject)
 
static QString minimalPattern (const QString &pattern)
 
 DEFINE_OBJECT_VTABLE (RegExpCtor)
 
static bool isRegExp (ExecutionEngine *e, const QV4::Value *arg)
 
uint parseFlags (Scope &scope, const QV4::Value *f)
 
static int advanceStringIndex (int index, const QString &str, bool unicode)
 
static void advanceLastIndexOnEmptyMatch (ExecutionEngine *e, bool unicode, QV4::Object *rx, const String *matchString, const QString &str)
 

Function Documentation

◆ advanceLastIndexOnEmptyMatch()

static void advanceLastIndexOnEmptyMatch ( ExecutionEngine e,
bool  unicode,
QV4::Object rx,
const String matchString,
const QString str 
)
static

Definition at line 528 of file qv4regexpobject.cpp.

References advanceStringIndex(), e, QV4::Scope::engine, QV4::Value::fromInt32(), QV4::ExecutionEngine::id_lastIndex(), rx(), str, and QV4::ExecutionEngine::throwTypeError().

Referenced by QV4::RegExpPrototype::method_match(), and QV4::RegExpPrototype::method_replace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ advanceStringIndex()

static int advanceStringIndex ( int  index,
const QString str,
bool  unicode 
)
static

Definition at line 516 of file qv4regexpobject.cpp.

References QString::at(), QChar::isHighSurrogate(), QChar::isLowSurrogate(), QString::size(), and str.

Referenced by advanceLastIndexOnEmptyMatch(), and QV4::RegExpPrototype::method_split().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DEFINE_OBJECT_VTABLE() [1/2]

DEFINE_OBJECT_VTABLE ( RegExpCtor  )

◆ DEFINE_OBJECT_VTABLE() [2/2]

DEFINE_OBJECT_VTABLE ( RegExpObject  )

◆ isRegExp()

static bool isRegExp ( ExecutionEngine e,
const QV4::Value arg 
)
static

Definition at line 212 of file qv4regexpobject.cpp.

References arg, e, QV4::Value::fromReturnedValue(), isRegExp(), and o.

Referenced by isRegExp(), and QV4::RegExpCtor::virtualCallAsConstructor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ minimalPattern()

static QString minimalPattern ( const QString pattern)
static

Definition at line 46 of file qv4regexpobject.cpp.

References i, QString::reserve(), QString::size(), and QChar::unicode().

+ Here is the call graph for this function:

◆ parseFlags()

uint parseFlags ( Scope scope,
const QV4::Value f 
)

Definition at line 225 of file qv4regexpobject.cpp.

References QString::at(), QV4::Scope::engine, QV4::Scope::hasException(), i, QStringLiteral, QV4::CompiledData::RegExp::RegExp_Global, QV4::CompiledData::RegExp::RegExp_IgnoreCase, QV4::CompiledData::RegExp::RegExp_Multiline, QV4::CompiledData::RegExp::RegExp_NoFlags, QV4::CompiledData::RegExp::RegExp_Sticky, QV4::CompiledData::RegExp::RegExp_Unicode, QString::size(), str, and QV4::ExecutionEngine::throwSyntaxError().

Referenced by QV4::RegExpCtor::virtualCallAsConstructor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: