Re: [Lxr-dev] multi-language identifiers
Brought to you by:
ajlittoz
From: Malcolm B. <ma...@br...> - 2004-07-22 16:58:12
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dave Brondsema wrote: | On Wed, 21 Jul 2004, Malcolm Box wrote: |>I think that's a misleading comment :-) The code does a !grep(/^$2$/, |>$self->langinfo('reserved')) which should filter out any reserved words |>as specified in the language info block. |> |>So there is a bug in the comment :-) | | Yes, reserved words are correctly limited to the current language. But | identifiers are not. Good point - the comment and the problem you originally reported are talking about different things: 1. ignoring any string which is a reserved word when checking if it is a symbol and 2. making the lookup of identifiers language dependent so that if e.g. a perl file defines foo and a C file defines foo then the correct one will be linked to. AFAICT the code does the former correctly, but as commented doesn't do the latter. This would require tagging each symbol with the language it was defined in. Also suspect that it might break clever code like the Javascript/C++ bridging in Mozilla - or at least make the LXR less useful. Cheers, Malcolm -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with MultiZilla - http://enigmail.mozdev.org iD8DBQFA//KOQeMefPKyX/QRAsfnAJ9CeWy/Ulu5Zz4a1ZvM/i2EFwQjEQCfWsoB +cQAw/vd32lewKKIrSoSG5w= =2dR2 -----END PGP SIGNATURE----- |