eclipse-archived / ceylon.formatter

A formatter for the Ceylon programming language, written in Ceylon.
Apache License 2.0
14 stars 11 forks source link

Don’t use VisitorAdaptor? #72

Closed lucaswerkmeister closed 10 years ago

lucaswerkmeister commented 10 years ago

Now that Ceylon supports overriding of overloaded Java methods, we could have FormattingVisitor extend Visitor rather than VisitorAdaptor, and remove VisitorAdaptor from the typechecker.

It’s probably not a lot of work… in fact, I think the method renaming is probably possible with a single sed -i replacement command.

On the other hand, I’m not sure if it’s worth the trouble, since in the medium term, I want to rewrite it for ceylon.ast anyways (in fact, if at all possible, I want to have the core formatter be platform-independent, with all the Java glue – compile + convert, file I/O – in a separate module; the CLI formatter would then be an assembly of those two modules).

@gavinking: If you want to get rid of VisitorAdaptor, I can do this… otherwise, I wouldn’t bother with it.

lucaswerkmeister commented 10 years ago

Closing. @davidfestal is now also using VisitorAdaptor in his IDE model delta builder, so we won’t remove VisitorAdaptor anyways.