0
@@ -51,16 +51,6 @@ limitations under the License.
0
-static bool valueIsTrue(id value)
0
- bool result = value && (value != Nu__null);
0
- if (result && nu_objectIsKindOfClass(value, [NSNumber class])) {
0
- if ([value doubleValue] == 0.0)
0
@implementation NuOperator : NSObject
0
- (id) callWithArguments:(id)cdr context:(NSMutableDictionary *)context {return nil;}
0
- (id) evalWithArguments:(id)cdr context:(NSMutableDictionary *)context {return [self callWithArguments:cdr context:context];}
0
@@ -220,7 +210,7 @@ static bool valueIsTrue(id value)
0
while (pairs != Nu__null) {
0
id condition = [[pairs car] car];
0
id test = [condition evalWithContext:context];
0
- if (
valueIsTrue(test)) {
0
+ if (
nu_valueIsTrue(test)) {
0
id cursor = [[pairs car] cdr];
0
while (cursor && (cursor != Nu__null)) {
0
@@ -290,7 +280,7 @@ static bool valueIsTrue(id value)
0
id test = [[cdr car] evalWithContext:context];
0
- bool testIsTrue = flip ^
valueIsTrue(test);
0
+ bool testIsTrue = flip ^
nu_valueIsTrue(test);
0
bool noneIsTrue = !testIsTrue;
0
id expressions = [cdr cdr];
0
@@ -299,7 +289,7 @@ static bool valueIsTrue(id value)
0
if (nu_objectIsKindOfClass(nextExpression, [NuCell class])) {
0
/*if ([nextExpression car] == elseifSymbol) {
0
test = [[[[expressions car] cdr] car] evalWithContext:context];
0
- testIsTrue = noneIsTrue &&
valueIsTrue(test);
0
+ testIsTrue = noneIsTrue &&
nu_valueIsTrue(test);
0
noneIsTrue = noneIsTrue && !testIsTrue;
0
@@ -318,7 +308,7 @@ static bool valueIsTrue(id value)
0
/*if (nextExpression == elseifSymbol) {
0
test = [[[expressions cdr] car] evalWithContext:context];
0
- testIsTrue = noneIsTrue &&
valueIsTrue(test);
0
+ testIsTrue = noneIsTrue &&
nu_valueIsTrue(test);
0
noneIsTrue = noneIsTrue && !testIsTrue;
0
expressions = [expressions cdr]; // skip the test
0
@@ -358,7 +348,7 @@ static bool valueIsTrue(id value)
0
id test = [[cdr car] evalWithContext:context];
0
- while (
valueIsTrue(test)) {
0
+ while (
nu_valueIsTrue(test)) {
0
id expressions = [cdr cdr];
0
@@ -391,7 +381,7 @@ static bool valueIsTrue(id value)
0
id test = [[cdr car] evalWithContext:context];
0
- while (!
valueIsTrue(test)) {
0
+ while (!
nu_valueIsTrue(test)) {
0
id expressions = [cdr cdr];
0
@@ -431,7 +421,7 @@ static bool valueIsTrue(id value)
0
[loopinit evalWithContext:context];
0
// evaluate the loop condition
0
id test = [looptest evalWithContext:context];
0
- while (
valueIsTrue(test)) {
0
+ while (
nu_valueIsTrue(test)) {
0
id expressions = [cdr cdr];
0
@@ -1071,7 +1061,7 @@ static bool valueIsTrue(id value)
0
while (cursor && (cursor != Nu__null)) {
0
value = [[cursor car] evalWithContext:context];
0
- if (!
valueIsTrue(value))
0
+ if (!
nu_valueIsTrue(value))
0
@@ -1089,7 +1079,7 @@ static bool valueIsTrue(id value)
0
while (cursor && (cursor != Nu__null)) {
0
id value = [[cursor car] evalWithContext:context];
0
- if (
valueIsTrue(value))
0
+ if (
nu_valueIsTrue(value))
0
@@ -1108,7 +1098,7 @@ static bool valueIsTrue(id value)
0
if (cursor && (cursor != Nu__null)) {
0
id value = [[cursor car] evalWithContext:context];
0
- return
valueIsTrue(value) ? Nu__null : [symbolTable symbolWithCString:"t"];
0
+ return
nu_valueIsTrue(value) ? Nu__null : [symbolTable symbolWithCString:"t"];
Comments
No one has commented yet.