Just a few seconds ago I pressed enter after writing
gem push maroon-0.7.1.gem
and I’m pretty satisfied with this version of maroon. The major chnaes are that you now define methods with regular method definition syntax I.e.
def methodname(arg1,...,argn) end
The other change I made is in how the abstract syntax tree is treated. Maroon has 3 stages
- Reading the source
- Creating the AST for each method. The AST is represented as a context with the productions playing the roles and productions are in the form of S-expressions
- Traversal of the AST and performing the source transformation. In this stage there’s a transformation context where the individual ASTs for each method in turn play a role
One of the reasons why I changed the stages was the AST build as a seperate step, so that other work could be build on top of that. E.g. one of the requirements I wrote of in a previous post. Namely creating a visual representation of the network of interconnected objects that make up a system. That is visually show how the roles in a context connect to each other in various interactions and role methods.
I also feel that Maroon now itself is a pretty good example on how to use maroon and also on how to do DCI. As always the source can be found at at github