diff options
author | Lars Knoll <[email protected]> | 2018-03-14 16:24:04 +0100 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2018-04-26 20:26:51 +0000 |
commit | c68dc99c92480b7794d4866602fc8a6fb0439a7a (patch) | |
tree | 203cfb19cd25d57ac925aa65ccd2810e658cbf8e /src/qml/jsruntime/qv4function_p.h | |
parent | 2ca47e49a25b92e70f6fa6c7a15cb7102a52435c (diff) |
Add support for arrow functions
Arrow parameter lists are tricky and require some reparsing
by the standard to avoid conflicts in the parser with
expression statements.
Add an IsArrowFunction flag to the CompiledData::Function. This
information is required in the runtime, when creating Function
objects, as it does influence their behaviour in subtle ways.
Change-Id: I298801b091f98e30a9269d3c77d9ff94e519dabc
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4function_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4function_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h index c8dbcec51d..d3206cc230 100644 --- a/src/qml/jsruntime/qv4function_p.h +++ b/src/qml/jsruntime/qv4function_p.h @@ -100,6 +100,7 @@ struct Q_QML_EXPORT Function { inline bool usesArgumentsObject() const { return compiledFunction->flags & CompiledData::Function::UsesArgumentsObject; } inline bool isStrict() const { return compiledFunction->flags & CompiledData::Function::IsStrict; } + inline bool isArrowFunction() const { return compiledFunction->flags & CompiledData::Function::IsArrowFunction; } QQmlSourceLocation sourceLocation() const { |