[Mono-list] Implementing attribute-based code generation

Stephen Touset stephen@touset.org
Wed, 12 Jan 2005 18:48:02 -0500


--=-RKaFX7ayIlfAdmC6kwhA
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I'm looking into the potential of writing code to allow mono to have
extensions. As a first foray into the idea, I'm going to try writing a
module that would look for specific attributes on methods and classes,
and use those to generate code that would go into the marked methods and
all methods of the marked classes, respectively.

However, looking at the mono source code, it seems to be very complex.
I'm looking for hints as to the best place to put the hooks for the
extension, because of this. My first idea would be to put this after the
parsing of the source tree, so that I can manipulate the methods as
they're in memory. However, I can't seem to find simple ways to navigate
through the memory representation of the source tree. Can anyone give me
a brief pointer to where I should be looking?

--=20
Stephen Touset <stephen@touset.org>

--=-RKaFX7ayIlfAdmC6kwhA
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBB5bcx+fMdKwQeHvYRAs6BAJ9V7fUufeYwxKhElrYdCkZEyPdJngCgqkop
HOiSytLEypH760yBgMFarVk=
=X92G
-----END PGP SIGNATURE-----

--=-RKaFX7ayIlfAdmC6kwhA--