Menu

Token: Flag eKeyword not set?

Harald S
2016-09-30
2016-09-30
  • Harald S

    Harald S - 2016-09-30

    Hello,

    using cppcheck for a long time now I got interested in the internals and maybe can help on some little improvements from time to time.

    When working on #7740, I wondered about the token flag eKeyword: this flag is not yet set for keywords such as return, throw, ...
    Is there a reason for this?
    I wanted to set this flag in case of a keyword, but that led to broken test cases.
    I think setting the flag would help when matching code patterns. For example, "return" is recognized as a type by cppcheck, and I have to manually check if that "return" is a keyword and add extra code for handling this.

    Any comments?

    Regards
    Harry

     
  • Mr. X

    Mr. X - 2016-09-30

    The reason is simply that its implementation has never been finished. Actually, there is currently only one keyword for which it is set: "delete". It would be very nice to have a patch that sets eKeyword for each language keyword.

     
  • Harald S

    Harald S - 2016-09-30

    ok. thanks for the answer.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.