mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
"($)path.($)variable" "SUBQUERY(collection, $x,$x = 2)" "sum:(arg1, ...)" "FUNCTION(target, selector, arg1, ...) "object[expression]" "set UNION|INTERSECT|MINUS otherset" Fixed a bug where CPExpression_set was evaluating to an expression instead of a set. Replaced parsing exceptions with a generic function indicating where it failed.
52 lines
741 B
Plaintext
52 lines
741 B
Plaintext
|
|
@import "CPExpression.j"
|
|
@import "CPString.j"
|
|
@import "CPDictionary.j"
|
|
|
|
var evaluatedObject = nil;
|
|
@implementation CPExpression_self : CPExpression
|
|
{
|
|
}
|
|
|
|
+ (id)evaluatedObject
|
|
{
|
|
if (evaluatedObject == nil)
|
|
evaluatedObject = [CPExpression_self new];
|
|
|
|
return evaluatedObject;
|
|
}
|
|
|
|
- (id)init
|
|
{
|
|
[super initWithExpressionType:CPEvaluatedObjectExpressionType];
|
|
|
|
return self;
|
|
}
|
|
|
|
- (id)initWithCoder:(CPCoder)coder
|
|
{
|
|
return [CPExpression_self evaluatedObject];
|
|
}
|
|
|
|
- (void)encodeWithCoder:(CPCoder)coder
|
|
{
|
|
}
|
|
|
|
- (BOOL)isEqual:(id)object
|
|
{
|
|
return (object === self);
|
|
}
|
|
|
|
- (id)expressionValueWithObject:(id)object context:(CPDictionary)context
|
|
{
|
|
return object;
|
|
}
|
|
|
|
- (CPString)description
|
|
{
|
|
return @"SELF";
|
|
}
|
|
|
|
@end
|
|
|