Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
b1af22b3
Commit
b1af22b3
authored
Feb 09, 2010
by
Erik Verbruggen
Browse files
Fixed error recovery when failing to parse Q_PROPERTY.
parent
28d72550
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Parser.cpp
View file @
b1af22b3
...
...
@@ -1822,11 +1822,12 @@ bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node)
QtPropertyDeclarationBoolItemAST
*
bItem
=
new
(
_pool
)
QtPropertyDeclarationBoolItemAST
;
bItem
->
item_name_token
=
consumeToken
();
ExpressionAST
*
expr
=
0
;
if
(
parseBoolLiteral
(
expr
))
if
(
parseBoolLiteral
(
expr
))
{
bItem
->
bool_value
=
expr
->
asBoolLiteral
();
else
item
=
bItem
;
}
else
{
_translationUnit
->
error
(
cursor
(),
"expected `true' or `false' before `%s'"
,
tok
().
spell
());
item
=
bItem
;
}
break
;
}
...
...
@@ -1840,16 +1841,20 @@ bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node)
default:
_translationUnit
->
error
(
cursor
(),
"expected `)' before `%s'"
,
tok
().
spell
());
return
true
;
// skip the token
consumeToken
();
}
if
(
item
)
{
*
iter
=
new
(
_pool
)
QtPropertyDeclarationItemListAST
;
(
*
iter
)
->
value
=
item
;
iter
=
&
(
*
iter
)
->
next
;
}
}
else
if
(
!
LA
())
{
break
;
}
else
{
_translationUnit
->
error
(
cursor
(),
"expected `)' before `%s'"
,
tok
().
spell
());
break
;
// skip the token
consumeToken
();
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment