Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: dbe71da0fd
Fetching contributors…

Cannot retrieve contributors at this time

file 81 lines (69 sloc) 2.367 kb
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;
}

+ compiledCodeNode;

- addSubnode:(CompiledCodeNode *)subnode;
- (long)firstCharIndex;
- (long)lastCharIndex;
- copy;
- copyWithZone:(NSZone *)zone;
- (void)dealloc;
- (void)encodeWithCoder:(NSCoder *)aCoder;
- (CompiledCodeNode *)getSubnode:(unsigned)pos;
//- (Array *)getListSubnode;
- init;
- (id)initWithCoder:(NSCoder *)aDecoder;
- insertSubnode:(CompiledCodeNode *)subnode at:(unsigned)pos;
- (unsigned)subnodeCount;
- setSubnode:(CompiledCodeNode *)subnode at:(unsigned)pos;
- 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;

- setBlockRep:(BlockRep *) theBlockRep;
- setFirstCharIndex:(long)first;
- setLastCharIndex:(long)last;
- setFirstCharIndex:(long)first last:(long)last;
- setFSIdentifier:(struct FSContextIndex) theIdentifier symbol:(NSString *)theSymbol;
- setSubnodes:(FSArray *)theListSubnode;
- setMessageWithReceiver:(CompiledCodeNode *) theReceiver
                selector:(NSString *) theSelector
                operatorSymbols:(NSString*) theOperatorSymbols;
- setNodeType:(enum FSCNType) theNodeType;
- setNumber:(FSNumber *)theNumber;
- setobject:(id)theobject;
- setReceiver:(CompiledCodeNode*)theReceiver;

-(void)translateCharRange:(int32_t)translation;

@end
Something went wrong with that request. Please try again.