diff options
Diffstat (limited to 'src/qml/parser/qqmljs.g')
-rw-r--r-- | src/qml/parser/qqmljs.g | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g index 67f9cc7581..8d79e48287 100644 --- a/src/qml/parser/qqmljs.g +++ b/src/qml/parser/qqmljs.g @@ -1694,6 +1694,14 @@ TypeAnnotation: T_COLON Type; } break; ./ + +TypeExpression: Type; +/. + case $rule_number: { + sym(1).Expression = new (pool) AST::TypeExpression(sym(1).Type); + } break; +./ + TypeAnnotationOpt: TypeAnnotation; TypeAnnotationOpt: ; /. @@ -2664,9 +2672,9 @@ RelationalExpression_In: RelationalExpression_In T_IN ShiftExpression; } break; ./ -TypeAssertExpression_In: RelationalExpression_In T_AS Type; +TypeAssertExpression_In: RelationalExpression_In T_AS TypeExpression; /. case $rule_number: Q_FALLTHROUGH(); ./ -TypeAssertExpression: RelationalExpression T_AS Type; +TypeAssertExpression: RelationalExpression T_AS TypeExpression; /. case $rule_number: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::As, sym(3).Expression); |