forked from pmougin/F-Script
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathFSCompilationResult.m
35 lines (29 loc) · 1.12 KB
/
FSCompilationResult.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
33
34
35
/* CompilationResult.m Copyright (c) 1998-2009 Philippe Mougin. */
/* This software is open source. See the license. */
#import "FSCompilationResult.h"
#import <stdlib.h>
@implementation FSCompilationResult
+ (id)compilationResultWithType:(enum CompilationResult_type)theType errorMessage:(NSString *)theErrorMessage errorFirstCharacterIndex:(NSInteger)first errorLastCharacterIndex:(NSInteger)last code:(FSCNBase *)theCode
{
return [[[self alloc] initWithType:theType errorMessage:theErrorMessage errorFirstCharacterIndex:first errorLastCharacterIndex:last code:theCode] autorelease];
}
- (void)dealloc
{
[errorMessage release];
[code release];
[super dealloc];
}
- (id)initWithType:(enum CompilationResult_type)theType errorMessage:(NSString *)theErrorMessage errorFirstCharacterIndex:(NSInteger)first errorLastCharacterIndex:(NSInteger)last code:(FSCNBase *)theCode
{
if ((self = [super init]))
{
type = theType;
errorMessage = [theErrorMessage retain];
errorFirstCharacterIndex = first;
errorLastCharacterIndex = last;
code = [theCode retain];
return self;
}
return nil;
}
@end