[Mathlib-commitlog] SF.net SVN: mathlib:[745] JMathLib/trunk/src/jmathlib/core/tokens
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2009-01-24 09:17:05
|
Revision: 745
http://mathlib.svn.sourceforge.net/mathlib/?rev=745&view=rev
Author: st_mueller
Date: 2009-01-24 09:16:55 +0000 (Sat, 24 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/tokens/BinaryOperatorToken.java
JMathLib/trunk/src/jmathlib/core/tokens/CaseToken.java
Modified: JMathLib/trunk/src/jmathlib/core/tokens/BinaryOperatorToken.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/tokens/BinaryOperatorToken.java 2009-01-24 09:15:51 UTC (rev 744)
+++ JMathLib/trunk/src/jmathlib/core/tokens/BinaryOperatorToken.java 2009-01-24 09:16:55 UTC (rev 745)
@@ -1,6 +1,8 @@
package jmathlib.core.tokens;
+import jmathlib.core.interpreter.GlobalValues;
+
/**The base class for all binary operators*/
public class BinaryOperatorToken extends OperatorToken
{
@@ -26,7 +28,7 @@
/**evaluate the operator
@param operands = the operators operands
@return the result as and OperandToken*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
return null;
}
Modified: JMathLib/trunk/src/jmathlib/core/tokens/CaseToken.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/tokens/CaseToken.java 2009-01-24 09:15:51 UTC (rev 744)
+++ JMathLib/trunk/src/jmathlib/core/tokens/CaseToken.java 2009-01-24 09:16:55 UTC (rev 745)
@@ -1,6 +1,7 @@
package jmathlib.core.tokens;
import jmathlib.core.interpreter.ErrorLogger;
+import jmathlib.core.interpreter.GlobalValues;
/**Used to implement if-then-else operations within an expression*/
@@ -31,7 +32,7 @@
/**evaluates the operator
@param operands = the operators operands
@return the result of the test as an OperandToken*/
- public OperandToken evaluate(Token[] operands)
+ public OperandToken evaluate(Token[] operands, GlobalValues globals)
{
if(value != null)
{
@@ -39,14 +40,14 @@
((OperandToken)operands[0]),
value);
- OperandToken result = exp.evaluate(null);
+ OperandToken result = exp.evaluate(null, globals);
if(result instanceof LogicalToken)
{
if(((LogicalToken)result).getValue(0))
{
ErrorLogger.debugLine("case is TRUE ");
- code.evaluate(null);
+ code.evaluate(null, globals);
return new LogicalToken(true);
}
}
@@ -54,7 +55,7 @@
else
{
ErrorLogger.debugLine("case is DEFAULT ");
- code.evaluate(null);
+ code.evaluate(null, globals);
return new LogicalToken(true);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|