How to fine qualified calls in SYNTAX_UPDATER_VISITOR ?

3 views
Skip to first unread message

Jimmy Johnson

unread,
Jul 5, 2015, 12:29:08 PM7/5/15
to eiffelst...@googlegroups.com
Manu,

Given a construct such as:

if (x.f) or (y.f) then
    a.f
    c := b.f
end

I want to "update" the text so that there is new text after the line "a.f" but I want to keep the other text as is.  IOW, I want to insert new text after a qualified feature call, but only when used as a statement not as an expression.  Perhaps said another way, I want to insert code after a command but not after a query.

I think I need to ignore if statement conditions, check instructions completely, object attachment tests, loop conditions, & perhaps others; but I do not understand which xxx_AS to use or where to put it.  I can follow the code of the SYNTAX_UPDATER_VISITOR and how it modifies text with calls to "context.add_string".

Thanks for your help
jjj

Reply all
Reply to author
Forward
0 new messages