Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qv4regexpobject.cpp File Reference

(8b6a9403bf2e04d34b9b07d2780186029fab99d0)

#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(), 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(), 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, QV4::Value::fromReturnedValue(), isRegExp(), o, and QV4::ExecutionEngine::symbol_match().

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, and QString::size().

+ 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: