-
Notifications
You must be signed in to change notification settings - Fork 2
/
DocIVar.m
47 lines (36 loc) · 1.25 KB
/
DocIVar.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
36
37
38
39
40
41
42
43
44
45
46
47
/*
Copyright (C) 2013 Muhammad Hussein Nasrollahpour
Author: Muhammad Hussein Nasrollahpour <iapplechocolate@me.com>
Date: September 2013
License: Modified BSD (see COPYING)
*/
#import "DocIVar.h"
#import "DocHTMLElement.h"
#import "DocIndex.h"
#import "DocDescriptionParser.h"
@implementation DocIVar
@synthesize typeEncoding;
// type name; => NSString *docGen;
// type<conformedProtocol> name; => id<DocWeaving> *weaver;
- (DocHTMLElement *)HTMLRepresentation
{
H hType = [SPAN class: @"type" with: nil];
[hType with: @"<"];
H hConformedProtocol = [SPAN class: @"ConformedProtocol" with: hType];
[hConformedProtocol with: @">"];
H hivarName = [SPAN class: @"IVarName"];
H hIvar = [SPAN class: @"iVar" with: hConformedProtocol and: hivarName];
H hiVarDesc = [DIV class: @"iVarDescription" with: hIvar];
// NSLog(@"%@", hiVarDesc);
return hiVarDesc;
}
- (void)parseProgramComponent:(SCKIvar *)anIVar
{
[self setName: [anIVar name]];
[self setTypeEncoding: [anIVar typeEncoding]];
[self appendToRawDescription: [[anIVar documentation] string]];
DocDescriptionParser *descriptionParser = [DocDescriptionParser new];
[descriptionParser parse: [self rawDescription]];
[self addInformationFrom: descriptionParser];
}
@end