public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
From: Ian Roxborough <irox@redhat.com>
To: "Keogh, Craig" <keogh@rlmsystems.com.au>
Cc: "'sourcenav@sourceware.cygnus.com'" <sourcenav@sourceware.cygnus.com>
Subject: Re: Adding a Parser: SN_LOCAL_VAR_DEF ?
Date: Thu, 09 Aug 2001 17:14:00 -0000	[thread overview]
Message-ID: <3B7329F6.89419A61@redhat.com> (raw)
In-Reply-To: <34168E9E775CD411A4430000F80768621B4433@unclassfs03.rlmsystems.com.au>

"Keogh, Craig" wrote:
> 
> Greetings,
> 
> I am writing an Ada parser for Source Navigator. Everything is working well
> except for one thing. Local Variable definitions.
> 
> If I call sn_insert_symbol with SN_GLOB_VAR_DEF (global variable), it works
> perfectly:
> - it is highlighted in the editor window
> - when the cursor is over the variable, it appears in the drop down box
> - xref'ing works
> 
> But if I use SN_LOCAL_VAR_DEF in exactly the same way, none of the above
> happen.

The code for passing on local variable information in the c++ parser
is working now.  It's been a while since I poked around in there, but
it doesn't use SN_LOCAL_VAR_DEF, it uses SN_REF_SCOPE_LOCAL and
SN_REF_TO_LOCAL_VAR, although it has been long enough for me to
forget how.  I think SN_REF_SCOPE_LOCAL is used to add a local
variable to a function (as in the declaration), and SN_REF_TO_LOCAL_VAR
used to mark uses of the declared local variable.

I could of course be completely wrong.

> Yes, "generate refences to local variables" in project preferences is ON.
> 
> Is this a problem with my parser or source navigator? Has anyone else
> experienced this?

Hmmm, not sure.  They could well be a problem with SN_LOCAL_VAR_DEF.

Local variables should be working in C/C++ use now.  You should
see them in the Xref window.

Ian.

  reply	other threads:[~2001-08-09 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-09 16:33 Keogh, Craig
2001-08-09 17:14 ` Ian Roxborough [this message]
2001-08-10  1:39 Mike_D_Davies
2001-08-10 10:21 ` Ian Roxborough
2001-08-14  1:08 Mike_D_Davies

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B7329F6.89419A61@redhat.com \
    --to=irox@redhat.com \
    --cc=keogh@rlmsystems.com.au \
    --cc=sourcenav@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).