     
     static var globalStoreTable:[String:Store] = [:]
     static var globalRoutineTable:[String:Routine] = [:]
+    static var globalRecordTable:[String:Record] = [:]
     static var scope:Scope?
     
 	class Program: AST {

            }
            
            if(AST.scope != nil){
                let check = AST.globalStoreTable[store.ident]
                if(check != nil) {
                    throw ContextError.IdentifierAlreadyDeclared
                } else {
                    AST.globalStoreTable[store.ident] = store
                }
            } else {
                let check = AST.scope!.storeTable[store.ident]
                if(check != nil) {
                    throw ContextError.IdentifierAlreadyDeclared
                } else {
                    AST.scope!.storeTable[store.ident] = store
                }
            }
        
            return store
        }
        
        override func checkDeclaration() throws {

                    
                    let check = AST.scope!.storeTable[store.ident]
                    if(check != nil) {
                        AST.scope!.storeTable[store.ident] = store
                        record.recordFields[store.ident] = store
                    } else {
                        throw ContextError.IdentifierAlreadyDeclared
                    }
                    
                    decl = decl!.typedIdent.optionalRecordDecl
                }
                
                AST.scope = oldScope
            } else {
                let store:Store = Store(ident: typedIdent.ident, type: type, isConst: isConst)
                if(AST.scope != nil){
                    let check = AST.scope!.storeTable[store.ident]
                    if(check != nil) {
                        throw ContextError.IdentifierAlreadyDeclared
                    } else {
                        AST.scope!.storeTable[store.ident] = store
                    }
                } else {
                    let check = AST.globalStoreTable[store.ident]
                    if(check != nil) {
                        throw ContextError.IdentifierAlreadyDeclared
                    } else {
                        AST.globalStoreTable[store.ident] = store
                    }
                }
            }
            try! nextDecl?.checkDeclaration()
        }
