diff options
author | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2020-01-28 14:21:10 +0100 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2020-01-31 14:33:12 +0100 |
commit | a87ad432a002614a5cca4d635ead5aedb97ba757 (patch) | |
tree | 5548b48b2be23909c761c2b4673bc72b999d3ea5 /src/qml/parser/qqmljslexer.cpp | |
parent | 65fa7e795dd67250b8d95f13ebd9924069864866 (diff) |
add annotations to QML
A QML Annotation is a Qml Object declaration prepended with @.
The name of the annotation is restricted to a dot separated list of
non keyword identifiers.
Annotations can be put before an Object definition, or any object
member declaration: bindings, property declarations, function
declarations.
This patch, aside parsing the annotations does absolutely nothing, the
list of annotations is discarded and never touches the AST.
[ChangeLog][QML] Add Qml Annotations
Task-number: QTBUG-81714
Change-Id: I4d79559a0d1fb23acaf482d0ef8f7d106dbf099d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljslexer.cpp')
-rw-r--r-- | src/qml/parser/qqmljslexer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljslexer.cpp b/src/qml/parser/qqmljslexer.cpp index 80d883e52f..0c61679f0b 100644 --- a/src/qml/parser/qqmljslexer.cpp +++ b/src/qml/parser/qqmljslexer.cpp @@ -719,6 +719,8 @@ again: case ')': return T_RPAREN; case '(': return T_LPAREN; + case '@': return T_AT; + case '&': if (_char == QLatin1Char('=')) { scanChar(); |