Symbol table notes to self

This commit is contained in:
greg 2019-08-12 11:27:16 -07:00
parent d9eca8ffb3
commit b65d6e4c8e

View File

@ -178,6 +178,7 @@ impl SymbolTable {
Ok(())
}
//TODO handle type mutability
fn add_type_decl(&mut self, type_name: &TypeSingletonName, body: &TypeBody, _mutable: &bool, scope_name_stack: &mut Vec<ScopeSegment>) -> Result<(), String> {
use crate::ast::{TypeIdentifier, Variant};
let TypeBody(variants) = body;
@ -208,8 +209,6 @@ impl SymbolTable {
};
self.add_new_symbol(variant_name, scope_name_stack, spec);
},
//TODO if there is only one variant, and it is a record, it doesn't need to have an
//explicit name
Variant::Record { name, members: defined_members } => {
let mut members = HashMap::new();
let mut duplicate_member_definitions = Vec::new();