diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-10 09:22:18 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-15 14:24:48 +0000 |
commit | 552ea3d320542af09a1983ec9a9fd9ba4324abc9 (patch) | |
tree | 31769d3815668ded6b04c7788d49a4baa6c7510e /src/qml/jsruntime/qv4regexpobject_p.h | |
parent | 5819700e0c2e17f8aa3e02bbfdf1d760906d02a4 (diff) |
Implement RegExp.prototype[Symbol.split]
Change-Id: Ia5ed7afc67122f4d70bf2e0169537f936df036a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject_p.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h index ba5a106c6b..ffac04e1f7 100644 --- a/src/qml/jsruntime/qv4regexpobject_p.h +++ b/src/qml/jsruntime/qv4regexpobject_p.h @@ -121,9 +121,6 @@ struct RegExpObject: Object { enum { NInlineProperties = 5 }; - Heap::RegExp *value() const { return d()->value; } - bool global() const { return d()->value->global(); } - bool sticky() const { return d()->value->sticky(); } void initProperties(); @@ -143,7 +140,12 @@ struct RegExpObject: Object { QRegExp toQRegExp() const; QString toString() const; QString source() const; - uint flags() const; + + Heap::RegExp *value() const { return d()->value; } + uint flags() const { return d()->value->flags; } + bool global() const { return d()->value->global(); } + bool sticky() const { return d()->value->sticky(); } + bool unicode() const { return d()->value->unicode(); } ReturnedValue builtinExec(ExecutionEngine *engine, const String *s); }; @@ -174,6 +176,7 @@ struct RegExpPrototype: Object static ReturnedValue method_replace(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); static ReturnedValue method_search(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); static ReturnedValue method_get_source(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); + static ReturnedValue method_split(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); static ReturnedValue method_get_sticky(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); static ReturnedValue method_test(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); static ReturnedValue method_toString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc); |