Commit 687a581a authored by Gregory Casamento's avatar Gregory Casamento
Browse files

Fix some code generation issues.

parent 828e9cb3
......@@ -51,8 +51,7 @@ NSString *tabulate(NSString *code)
@end
// Define a subclass for future expansion...
@implementation ASTSymbolTable : NSMutableDictionary
@end
#define ASTSymbolTable NSMutableDictionary
// Context
@implementation ASTContext
......@@ -176,11 +175,15 @@ NSString *tabulate(NSString *code)
ASTSymbolTable *table = [[ASTSymbolTable alloc] init];
[self.symbols addObject:table];
}
if(self.symbolsIndex > 0)
if(self.symbolsIndex < 0)
{
[[self.symbols objectAtIndex:self.symbolsIndex] setObject:type
forKey:name];
[self saveSymbols];
}
[[self.symbols objectAtIndex:self.symbolsIndex] setObject:type
forKey:name];
}
- (GenericType *)inferSymbol: (NSString *)name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment