public override void EnterInverseAttribute(ExpressParser.InverseAttributeContext context) { var attr = new AttributeDeclaration(); TypeInfo typeInfo = null; var name = context.Identifier()[0].GetText(); //COLLECTION if (context.collection() != null) { typeInfo = new CollectionInfo(name); } // DEFINED TYPE else if (context.Identifier()[1] != null) { typeInfo = new DefinedTypeInfo(name); typeInfo.ValueType = TypeInfo.ToSystemType(context.Identifier()[1].GetText()); } attr.TypeInfo = typeInfo; currentTypeInfo = typeInfo; currentEntityInfo.Attributes.Add(attr); }
/// <summary> /// Exit a parse tree produced by <see cref="ExpressParser.inverseAttribute"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitInverseAttribute([NotNull] ExpressParser.InverseAttributeContext context) { }