The installation is fantastically easy. Go to Thoth on Squeaksource and get
In a workspace, then execute:
Add the method compilerClass to the CLASS side of your class to set the compiler for the class. Thoth installs itself as the default compiler of the image. If you're unhappy with that, for example because you don't like the lack of error messages when you accept uncompilable code, you can choose for each class which compiler is to be used.
Behavior>compilerClassssets the default.
How do I hack into it?
Subclass ThothCompiler and override #compile:in:classified:notifying:ifFail: and #evaluate:in:to:notifying:ifFail:logged: Transform the AST before
generateis called. Perhaps I should provide some infrastructure here …
How it works
It is a really simple thing: It uses the parser of the NewCompiler, then transforms the AST into the old model, and then uses the backend of the old compiler to compile.