Author | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 5 (100.0%) | 53 (100.0%) | 10.6 |
tshishikub | 3 (60.0%) | 52 (98.1%) | 17.3 |
ivyj | 2 (40.0%) | 1 (1.9%) | 0.5 |
Did some refactoring of Parsing code so that have less duplicated code.
- mainly created methods to parse instruction parameters (in SLogoParser). This code showed up in a lot of places, so it was good to make into methods.
Added a lot of tests to SLogoParserTest
Added a few methods to Turtle class so that the Parsing code does less/knows less about Turtle's innerworkings. (Required adding "notifyListeners" to some of Turtle's methods)
Cleaned up code: removed debugging statements
0 lines of code changed in 1 file:
Made some major and minor changes
Created instruction hierarchy:
- ConditionalInstructions
- return 1 or 0 when evaluated
- NumericInstructions
- return a number when evaluated
- OneParameterInstructions
- have a parameter (often numeric) that needs to be evaluated
Made lots of changes because of the above changes. Needed to update the parsers and the instruction classes.
Added some methods to the Turtle class so that the Instructions have less knowledge of the Turtle's innerworkings.
Moved SubroutineFactory to slogo.language package instead of slogo.expression
Updated comments in many instructions (use the Javadoc in the evaluate)
43 lines of code changed in 2 files:
1 lines of code changed in 2 files:
Changed TreeMap to HashMap.
2 lines of code changed in 1 file:
Created SLogoContext that implements Context and sets up the Context.
30 lines of code changed in 1 file:
Created SlogoContext class that implements the Context interface.
20 lines of code changed in 1 file:
slogo.language.Context: Changed the interface of the value method to return an Object
1 lines of code changed in 1 file:
Reorganized code some more to have better names
85 lines of code changed in 3 files: