예제 #1
0
        public override object VisitTableElement([NotNull] MiniSQLParser.TableElementContext context)
        {
            TableElement element = new TableElement();

            if (context.columnDefinition() != null)
            {
                element.Type = TableElementType.AttributeDeclaration;
                element.AttributeDeclaration = (AttributeDeclaration)Visit(context.columnDefinition());
            }
            else
            {
                element.Type       = TableElementType.PrimaryKey;
                element.PrimaryKey = (string)Visit(context.tableConstraintDef());
            }
            return(element);
        }