[gcjx] RFC/RFA: A Simple Pretty-Printer for the AST (WIP)

Tom Tromey tromey@redhat.com
Sat Oct 8 22:42:00 GMT 2005


>>>>> "Ranjit" == Ranjit Mathew <rmathew@gmail.com> writes:

Ranjit>   I am attaching a work-in-progress implementation of a simple
Ranjit> pretty-printer for the AST. 
Ranjit> Comments? OK to apply?

I think it is fine.  Thanks for doing this.
Feel free to check in future dumper changes with just an 'fyi' note.

Ranjit> +    modifier_t mods = field->get_modifiers ();
Ranjit> +    if ((mods & ACC_PUBLIC) != 0)
Ranjit> +      out << " PUBLIC";

Maybe a helper function to print this stuff?
Not all of the modifiers in modifier.hh are actually used in gcjx
yet, but that is only because I haven't yet implemented bridge
methods and whatnot.

You may also want to \-quote "weird" characters in string literals.
Kind of a pain though.

Tom



More information about the Java-patches mailing list