Commit Graph

15 Commits

Author SHA1 Message Date
TomyLobo
662e597f1a Moved temporary variable creation from Parser to Expression. 2011-11-30 04:45:48 +01:00
TomyLobo
5ec6276674 Made ExpressionTest invoke the optimizer every time it evaluates an expression.
This way that thing at least gets SOME coverage.
2011-11-24 21:00:09 +01:00
TomyLobo
71287299b5 Added a simple for loop to the expression parser.
Syntax: for (counter = first, last) { body }
Also added a test case.
2011-11-24 02:35:19 +01:00
TomyLobo
7e13b60a51 Cleanup 2011-11-23 04:48:40 +01:00
TomyLobo
effbf9f79c Added for loops to the expression parser, java style.
Also:
- Added a test case for for
- Fixed Identifiable.id() for the runtime Nodes and added missing elements to the list in Identifiable.java.
- Factored keyword and character consumption into a common function.
2011-11-22 16:08:15 +01:00
TomyLobo
f217be0bdf Added while loops to the expression parser.
Also added a test case.
Iterations are currently limited to 256 maximum.
2011-11-22 06:16:23 +01:00
TomyLobo
aa43975e34 Added support for if/else to the expression parser. Basically same syntax as Java.
Also added a test case.
2011-11-22 05:12:32 +01:00
TomyLobo
e70446e82e Renamed RValue.invoke() to getValue. 2011-10-29 16:03:55 +02:00
TomyLobo
ee79abff67 The expression parser can now parse more than a simple expression
- Added sequencing (; and {}).
- Added =, +=, -=, *=, /=, %=, ^= to the expression parser. (left-associative for now, will change later)
- Added pre-increment(++) and pre-decrement(--) operators.
- Adjusted/added tests.
2011-10-27 19:16:46 +02:00
TomyLobo
d93d85cd37 Added an expression parser. 2011-10-18 01:04:04 +02:00
TomyLobo
f354ab392f Refactored BlockData test case to reduce code duplication. 2011-09-29 08:19:02 +02:00
TomyLobo
21c6ab894c Moved BlockData to the blocks package and left a stub with deprecated delegates behind. 2011-09-28 10:45:32 +02:00
Wizjany
102e5f142e Fix data cycling the right way. Merged TomyLobo's test changes in. 2011-09-26 05:53:04 -04:00
TomyLobo
c6c55c3b2a Adjusted some of the cycler code and added a test case for it.
- Added range checks for most blocks
- torches: Fixed cycle from 0->1->2->3->0 to 1->2->3->4->1
- mushroom caps: Included data value 10 (stem) in cycle
- vines: Included data value 0 (top attachment only) in the cycle
- furnaces/dispensers: Linearised the cycle. It's now 2->3->4->5->2
- chests/ladders: Added cycle code.
- rails: Linearised the cycle. It's now 6->7->8->9->6
2011-09-25 10:52:29 +02:00
TomyLobo
93f36955ca Added a test case for BlockData.
Fixed some non-breaking inaccuracies to make the test case work.
2011-09-25 06:08:31 +02:00