Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
a4245c17
Commit
a4245c17
authored
May 21, 2010
by
Roberto Raggi
Browse files
Improved recovering from errors inside template declarations.
parent
c5d110d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Parser.cpp
View file @
a4245c17
...
...
@@ -986,7 +986,18 @@ bool Parser::parseTemplateDeclaration(DeclarationAST *&node)
match
(
T_GREATER
,
&
ast
->
greater_token
);
}
parseDeclaration
(
ast
->
declaration
);
do
{
unsigned
start_declaration
=
cursor
();
ast
->
declaration
=
0
;
if
(
parseDeclaration
(
ast
->
declaration
))
break
;
_translationUnit
->
error
(
start_declaration
,
"expected a declaration"
);
rewind
(
start_declaration
+
1
);
skipUntilDeclaration
();
}
while
(
LA
());
node
=
ast
;
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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