Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Parsing Source code String into a IASTNODe (or IAStTranslationUnit)

You can look at the code of existing refactorings to see how they modify the code.

-sergey

On Wed, Sep 16, 2015 at 11:40 AM, Krishna Narasimhan <krishna.nm86@xxxxxxxxx> wrote:
I want to dynamically construct an _expression_ that should replace the existing limit of the loop

So the usecase is like this

1) Get the limit of the loop. Lets say its "10" (The for statement is simple in this case (for int i = 0; i < limit; i++)

Now I want to replace it with for( int = 0; i < limit/float_v::size; i ++)

On Wed, Sep 16, 2015 at 8:33 PM, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> wrote:
A translation unit can only be parsed as a whole. What exactly are you trying to do?

-sergey

On Wed, Sep 16, 2015 at 11:25 AM, Krishna Narasimhan <krishna.nm86@xxxxxxxxx> wrote:
Hello,
    Is there a way to parse a string back into a node or a translation unit. For example, something like 15/type_x::Size

where type_x is a user defined type and Size is a property of that type.




_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev



--
-----------------------------------------------------
I dare do all that may become a man; Who dares do more, is none - Macbeth, twelfh night!
Regards
       Krishna

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top