Re: Semantic cannot parse a c++ enum
Vincent Semeria <[email protected]>
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <CAJJyN4sxuC5kPc8wcDR2yonQfpZFnmqTUe6br3oF8K+Q-3C4Fw@mail.gmail.com> |
Hello Eric, Thanks for the patch but I found another workaround in the meantime : semantic-complete-jump. I don't know why but it has the missing enum symbols. So I made my custom jump function, why tries in order : 1) local variables and args (no context needed, very fast) 2) semantic-ia-fast-jump 3) semantic-complete-jump I'll stick with this one until you are sure of a solution and deliver it in the usual cedet's repos. You might find the answer in the logic of semantic-complete-jump. Thanks, Vincent On Mon, Nov 24, 2014 at 8:41 PM, Eric Ludlam <[email protected]> wrote: > On 11/21/2014 04:49 AM, Vincent Semeria wrote: > >> Hello, >> >> In the attached c++ file which contains a simple enum and 2 functions, >> set the point in function main, on word seBadPassword (an entry of the >> enum). >> >> Then run semantic-ia-fast-jump, which will fail to locate this entry in >> the enum's definition, whereas it's only 15 lines above. >> > > As far as I know, Semantic's smart completion engine doesn't handle enums > in terms of pulling enum symbols into the global namespace where they can > be found. > > It worked OK when I did: > > WriteEvent(securityEvent::seBadPassword); > > but that is undesirable. > > I poked around a little to see where I might be able to update this, and > found that if I treat enums like namespaces while scoping in symbols, it > appears to work. I'm a bit hesitant to make this change as I'm not sure > what consequences there might be. I looked through the tests, and tests > for enums are missing, so I don't have a good way to know what I might have > broken. > > Regardless, here is a patch you can play with. Let me know how it goes, > or if it breaks anything new. > > Eric > ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Cedet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-devel