Wednesday, November 14, 2018
Friday, November 02, 2018
Dynamic creation of compiler plugins in Pharo
A new class (merged this week into Pharo 7) called "OCCompilerDynamicASTPlugin" allows for the dynamic creation of compiler plugins
This would give 'meaning of life'
Object compiler
addPlugin:
(OCCompilerDynamicASTPlugin
newFromTransformBlock: [ :ast | (RBParseTreeRewriter replaceLiteral: 42 with: 'meaning of life') executeTree: ast. ast. ]
andPriority: 0
);
evaluate: '42'.
Subscribe to:
Posts (Atom)