-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CXX: Improve parsing of function-try-blocks and try/catch in general #1749
CXX: Improve parsing of function-try-blocks and try/catch in general #1749
Conversation
@@ -1 +1,4 @@ | |||
--c++-kinds=+pflz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--kinds-c++=... is preferable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
parsers/cxx/cxx_parser.c
Outdated
|
||
// and extract variable declarations if possible | ||
cxxParserExtractVariableDeclarations(pChain,0); | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visual Studio makes a warning on this line (https://ci.appveyor.com/project/universalctags/ctags/build/1.0.763/job/wim07v3kr02a88r6). How about using trigraph like:
bOkToExtractVariables = cxxTokenChainNextTokenOfType(
pAndOrStar,
CXXTokenTypeAssignment | CXXTokenTypeSemicolon
)? true: false;
or ...
} else if ( cxxTokenChainNextTokenOfType(
pAndOrStar,
CXXTokenTypeAssignment | CXXTokenTypeSemicolon)) {
bOkToExtractVariables = true;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
parsers/cxx/cxx_tag.c
Outdated
@@ -286,6 +286,9 @@ vString * cxxTagSetProperties(unsigned int uProperties) | |||
vStringCatS(pszProperties,_szProperty); \ | |||
} while(0) | |||
|
|||
// FIXME: The property names might be too verbose. Maybe it could be a good idea | |||
// to a switch to shorten them to 1-2 letter codes? | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think basically using long names is not bad.
Making shortere can be done in a post processor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Thank you. |
Improved solution for #1746.
-- the variables declared inside now have proper scope
-- the function ends after the last catch()