[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Getting text of symbols when genning code

From: Charles Lohr
Subject: Re: [Tinycc-devel] Getting text of symbols when genning code
Date: Sat, 30 Sep 2017 13:44:02 -0400

I regret that I asked this too soon. (One would not expect 2 hours on a problem to be too soon) but it was.

The answer is, in a function call, vtop can be indexed in reverse...  [vtop-nb_args]( vtop-nb_args+1, ..., vtop );  Once that is kept in mind, symbols can be acquired by: get_tok_str( [selected vtop]->sym->v, NULL);

Figured I would answer my own question so others don't have to, and this will stand for future people's google searches.

On Sat, Sep 30, 2017 at 1:26 PM, Charles Lohr <address@hidden> wrote:
One of the issues I'm running into is I want to  be able to use the actual function or variable names for some things when generating my code.  I.e. gfunc_call(...) How can I find the actual text of the function I'm calling, or, when loading/storing variables how to get the names of the variables.

I've tried using get_tok_str on just about every and any pointer I can get my hands on in gfunc_call(...).  None give me the function name.  Is there a good general rule for getting symbol names "near me"?

I know I've been asking a lot of questions, but you guys are REALLY helpful.  I really appreciate it!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]