private void AddGlobalComponents(XmlSchema schema) { foreach (XmlSchemaElement el in schema.Elements.Values) { GlobalElements.Add(el.QualifiedName, el); } foreach (XmlSchemaAttribute a in schema.Attributes.Values) { GlobalAttributes.Add(a.QualifiedName, a); } foreach (XmlSchemaType t in schema.SchemaTypes.Values) { GlobalTypes.Add(t.QualifiedName, t); } foreach (XmlSchemaAttributeGroup g in schema.AttributeGroups.Values) { global_attribute_groups.Add(g.QualifiedName, g); } foreach (XmlSchemaGroup g in schema.Groups.Values) { global_groups.Add(g.QualifiedName, g); } foreach (DictionaryEntry pair in schema.IDCollection) { global_ids.Add(pair.Key, pair.Value); } foreach (XmlSchemaIdentityConstraint ic in schema.NamedIdentities.Values) { global_identity_constraints.Add(ic.QualifiedName, ic); } }
public override void Visit(EnumAST enumAST) { var typeInfo = new CustomTypeInfo { type = enumAST, kind = TypeKind.ENUM, scopeId = _currentScope.id, position = _currentNodePosition, memberNameType = new Dictionary <string, TypeAST>() }; foreach (var member in enumAST.Values) { var variableDec = member as VariableDecAST; typeInfo.memberNameType.Add(variableDec.Name, variableDec.Type); } AddType(typeInfo); if (_currentScope.id != 0) { return; } GlobalTypes.Add(enumAST.Name); }
private void ClearGlobalComponents() { GlobalElements.Clear(); GlobalAttributes.Clear(); GlobalTypes.Clear(); global_attribute_groups.Clear(); global_groups.Clear(); global_notations.Clear(); global_ids.Clear(); global_identity_constraints.Clear(); }