You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
506 B
30 lines
506 B
11 years ago
|
package net.mightypork.rcalc.tokens;
|
||
|
|
||
|
|
||
|
import net.mightypork.rcalc.TokenList;
|
||
|
import net.mightypork.rcalc.operations.Operation;
|
||
|
import net.mightypork.rcalc.operations.OperationDivide;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Division token
|
||
|
*
|
||
|
* @author Ondrej Hruska
|
||
|
*/
|
||
|
public class TokenOperatorDivide extends TokenBinaryOperator {
|
||
|
|
||
|
@Override
|
||
|
public String toString() {
|
||
|
|
||
|
return "/";
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public Operation toOperation(TokenList left, TokenList right) {
|
||
|
|
||
|
return new OperationDivide(left.parse(), right.parse());
|
||
|
}
|
||
|
|
||
|
}
|