[root]/src/slogo/instruction/arithmetic
Author | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 6 (100.0%) | 40 (100.0%) | 6.6 |
tshishikub | 5 (83.3%) | 40 (100.0%) | 8.0 |
ivyj | 1 (16.7%) | 0 (0.0%) | 0.0 |
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
23 lines of code changed in 6 files:
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)
104 lines of code changed in 8 files:
Added documentation to classes in slogo.instruction packages.
38 lines of code changed in 4 files:
fixed MINUS command. involve making slogo.expression.UnaryExpression an instruction (and moving it into the slogo.instruction package)
2 lines of code changed in 1 file:
got rid of some more import warnings
0 lines of code changed in 1 file:
Updated documentation
Cleaning up mess from my moving instructions around
1 lines of code changed in 2 files:
Major: Changed from using "Expression" superclass to using "GrammarElement" super class.
- allows handling instructions in instructions
Added a JUnit test case for SLogoParser (more tests should be added)
Reorganized the Instructions into packages so easier to find.
- Not possible for Tokens because of use of reflection
Added Quotient to InstructionProps file
Updated the Documentation
Other minor changes to code
192 lines of code changed in 7 files: