forked from pmougin/F-Script
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCompiledCodeNode.h
81 lines (69 loc) · 2.39 KB
/
CompiledCodeNode.h
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* CompiledCodeNode.h Copyright (c) 1998-2008 Philippe Mougin. */
/* This software is open source. See the license. */
#import <Foundation/Foundation.h>
#import "FSMsgContext.h"
#import "FSSymbolTable.h"
#import "BlockRep.h"
#import "FSCNBase.h"
//enum compiledCodeNode_type {IDENTIFIER, MESSAGE, STATEMENT_LIST, OBJECT, ARRAY, TEST_ABORT, BLOCK, ASSIGNMENT, NUMBER, CASCADE};
@class FSBlock;
@class FSPattern;
@class FSArray;
@class FSNumber;
@interface CompiledCodeNode: NSObject <NSCopying, NSCoding>
{
@public
FSArray *subnodes;
long firstCharIndex;
long lastCharIndex;
enum FSCNType nodeType;
NSString *operator;
struct FSContextIndex identifier; // IDENTIFIER
NSString *identifierSymbol; // IDENTIFIER
CompiledCodeNode *receiver;
NSString *selector; // used for MESSAGE
FSMsgContext *msgContext;
id object;
SEL sel;
}
+ (id)compiledCodeNode;
- (id)addSubnode:(CompiledCodeNode *)subnode;
- (long)firstCharIndex;
- (long)lastCharIndex;
- (id)copy;
- (id)copyWithZone:(NSZone *)zone;
- (void)dealloc;
- (void)encodeWithCoder:(NSCoder *)aCoder;
- (CompiledCodeNode *)getSubnode:(unsigned)pos;
//- (Array *)getListSubnode;
- (id)init;
- (id)initWithCoder:(NSCoder *)aDecoder;
- (id)insertSubnode:(CompiledCodeNode *)subnode at:(unsigned)pos;
- (unsigned)subnodeCount;
- (id)setSubnode:(CompiledCodeNode *)subnode at:(unsigned)pos;
- (id)removeSubnode:(unsigned)pos;
- (enum FSCNType) nodeType;
- (struct FSContextIndex) identifier;
- (NSString *) identifierSymbol;
- (NSString *) operatorSymbols;
- (CompiledCodeNode *) receiver;
//- (NSString *) selector;
- (SEL) sel;
- (FSMsgContext *) msgContext;
- (id) object;
- (FSPattern *)pattern;
- (id)setBlockRep:(BlockRep *) theBlockRep;
- (id)setFirstCharIndex:(long)first;
- (id)setLastCharIndex:(long)last;
- (id)setFirstCharIndex:(long)first last:(long)last;
- (id)setFSIdentifier:(struct FSContextIndex) theIdentifier symbol:(NSString *)theSymbol;
- (id)setSubnodes:(FSArray *)theListSubnode;
- (id)setMessageWithReceiver:(CompiledCodeNode *) theReceiver
selector:(NSString *) theSelector
operatorSymbols:(NSString*) theOperatorSymbols;
- (id)setNodeType:(enum FSCNType) theNodeType;
- (id)setNumber:(FSNumber *)theNumber;
- (id)setobject:(id)theobject;
- (id)setReceiver:(CompiledCodeNode*)theReceiver;
-(void)translateCharRange:(int32_t)translation;
@end