roxen.lists.pike.general

Subject Author Date
Re: Is there anyway to have a class always be inherited from other objects? Dino M. Gambone <dmgambone[at]yahoo[dot]com> 10-09-2009
That is very clever.  Does this compile fine?  The reason I ask is I saw you
were using Parser.Pike several times, but those methods are not in the
Parser.Pike documentation (Parser.C) has them instead.

If it does compile (Parser.Pike inherits from Parser.C?), then I think I just
struck gold with this little tidbit of code.  :)




________________________________
From: Tobias S. Josefowitz <<t.josefowitz[at]gmail.com>>
To: Dino M. Gambone <<dmgambone[at]yahoo.com>>
Cc: "Mirar @ Pike importmöte för mailinglistan" <<6341[at]lyskom.lysator.liu.se>>;
<pike[at]roxen.com>
Sent: Thursday, September 10, 2009 10:38:33 AM
Subject: Re: Is there anyway to have a class always be inherited from other 
objects?

2009/9/8 Dino M. Gambone <<dmgambone[at]yahoo.com>>:
> I thought about that, but what about files that have individual class
> definitions in them?  How would that get handled?

I've just written a small replacement master that overloads
compile_string(), searches through it and adds a base-class inherit
into all files and class definitions in them.
It is all but well tested and productive, additionally you can
circumvent the mechanism by using compile(string). Additionally there
may exist lots of problems, I've not yet let it on the loose with
production code.
It does retain line numbers however (for compilation error messages etc.).

Maybe this helps or gives you an impression (if not I still had the
fun of writing it).
http://public.tobij.de/res/plain/baseclass/ (invoke with pike
test.pike test2.pike, as test.pike is a base-class-inserting loader
for other pike scripts).