aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljslexer.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-08-08 13:15:40 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-15 14:24:23 +0000
commita1964f0b8e0569ef9ab754e2ec4c4d0559bc7681 (patch)
tree36416a7583527d87409ce0f9152687750a265e03 /src/qml/parser/qqmljslexer.cpp
parent15f56b74dc18c1105c9943f76599dbab5214b8e8 (diff)
Cleanup RegExpObject
Move properties from RegExpObject to getters in RegExp.prototype to be compliant with the JS spec. Implement support for the sticky flags ('y') and correctly parse the flags in the RegExp constructor. Change-Id: I5cf05d14e8139cf30d46235b8d466fb96084fcb7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljslexer.cpp')
-rw-r--r--src/qml/parser/qqmljslexer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljslexer.cpp b/src/qml/parser/qqmljslexer.cpp
index e93dda942a..b98bb8bac5 100644
--- a/src/qml/parser/qqmljslexer.cpp
+++ b/src/qml/parser/qqmljslexer.cpp
@@ -59,6 +59,7 @@ static inline int regExpFlagFromChar(const QChar &ch)
case 'i': return Lexer::RegExp_IgnoreCase;
case 'm': return Lexer::RegExp_Multiline;
case 'u': return Lexer::RegExp_Unicode;
+ case 'y': return Lexer::RegExp_Sticky;
}
return 0;
}