forked from pmougin/F-Script
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathFSBlockCompilationResult.m
32 lines (26 loc) · 1.03 KB
/
FSBlockCompilationResult.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* FSBlockCompilationResult.m Copyright (c) 1998-2009 Philippe Mougin. */
/* This software is open source. See the license. */
#import "FSBlockCompilationResult.h"
@implementation FSBlockCompilationResult
+ (id)blockCompilationResultWithType:(enum FSBlockCompilationResultType)theType errorMessage:(NSString *)theErrorMessage errorFirstCharacterIndex:(NSInteger)first errorLastCharacterIndex:(NSInteger)last
{
return [[[self alloc] initWithType:theType errorMessage:theErrorMessage errorFirstCharacterIndex:first errorLastCharacterIndex:last] autorelease];
}
- (void)dealloc
{
[errorMessage release];
[super dealloc];
}
- (id)initWithType:(enum FSBlockCompilationResultType)theType errorMessage:(NSString *)theErrorMessage errorFirstCharacterIndex:(NSInteger)first errorLastCharacterIndex:(NSInteger)last
{
if ((self = [super init]))
{
type = theType;
errorMessage = [theErrorMessage retain];
errorFirstCharacterIndex = first;
errorLastCharacterIndex = last;
return self;
}
return nil;
}
@end