Adding a feature to a parsed Eiffel File

"urmuelle" <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>

Hi!

I am trying to add new features to already existing files by parsing
them, adding the new features and then writing them back. What do i
have to do apart from creating an instance of any of those feature
types and adding it to a classes feature list?

Here is an example

a_class: ET_CLASS
a_feature: ET_DEFERRED_PROCEDURE

a_class := ...

create a_feature.make (a_feature_name, Void, Void, Void, Void,
clients, a_class)

create a_featurelist.make_with_capacity (a_class.features.count + 1)
				
a_featurelist.force_first (a_feature)

from i:=0 until i=a_class.features.count loop
	i := i+1
	a_featurelist.force_first (a_class.features.item(i))
end

a_class.set_features (a_featurelist, a_featurelist.count)



When going through the names after appending the new feature, it shows
also the name of the new feature, but it is not appended when writing
the AST back to a file.


Can anyone help me?

-- Urs







To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gobo-eiffel/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.