Files
cappuccino/Foundation/CPPredicate/CPExpression_self.j
T
cacaodev 4b1fbf1eff Implemented subquery expressions.
Added missing getters in CPExpression.
Added a type: argument to FunctionExpression initializer used by  subclasses to init super with their own type.
Fixed evaluation with bindings dictionary in CPExpression_variable. Allow values in bindings to be a constant or an expression (per cocoa).

Tests: added tests for subqueryExpressions, for variableExpression evaluation where the value in the bindings dictionary can be either a constant or another expression.
Parsing a simple variable expression works (e.g. '$x = 12'), parsing a variable in a combined path (e.g.
'$x.path = 12' won't yet.
2010-10-29 18:58:29 +02:00

44 lines
629 B
Plaintext

@import "CPExpression.j"
@import <Foundation/CPString.j>
@import <Foundation/CPDictionary.j>
@import <Foundation/CPCoder.j>
@implementation CPExpression_self : CPExpression
{
}
- (id)init
{
[super initWithExpressionType:CPEvaluatedObjectExpressionType];
return self;
}
- (id)initWithCoder:(CPCoder)coder
{
return [self init];
}
- (void)encodeWithCoder:(CPCoder)coder
{
}
- (BOOL)isEqual:(id)object
{
return (_type == CPEvaluatedObjectExpressionType);
}
- (id)expressionValueWithObject:(id)object context:(CPDictionary)context
{
return object;
}
- (CPString)description
{
return @"SELF";
}
@end