taqi/MonkeyCoder — Issue #13: AsignmentExpressionSnippet + tests
Author: taqi
Created: 2012-01-22 23:12:39+00:00
State: open

Look at the ExpressionSnippet class.
As you can see, this is the bottom class for the code - it returns empty codeSnippet collection.
So, this snippet should generate code directly )
Lets start to create some bottom generators.
Here we need to generate assignment code, like a= "a", etc.
Note, that it should be assignment to existed variable, so we don't need to generate modificator clause, Type clause, etc.
Because this task already done by FieldCodeSnippet.
Steps to implement:
- implement getCode method with leftPart.getCode + " = " + rightPart.getCode + ";\n"
- extend tests with different cases.
- See AssignmentExpression to get correct code.