2015-12-08 04:51:55 +08:00
|
|
|
#pragma once
|
2015-08-30 07:12:46 +08:00
|
|
|
|
|
|
|
#include "list.hpp"
|
|
|
|
#include "identifier.hpp"
|
|
|
|
|
|
|
|
namespace ast
|
|
|
|
{
|
|
|
|
|
|
|
|
struct RelationshipList : public List<Identifier, RelationshipList>
|
|
|
|
{
|
|
|
|
using List::List;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct RelationshipSpecs : public AstNode<RelationshipSpecs>
|
|
|
|
{
|
|
|
|
RelationshipSpecs(Identifier* idn, RelationshipList* types, PropertyList* props)
|
|
|
|
: idn(idn), types(types), props(props) {}
|
|
|
|
|
|
|
|
Identifier* idn;
|
|
|
|
RelationshipList* types;
|
|
|
|
PropertyList* props;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Relationship : public AstNode<Relationship>
|
|
|
|
{
|
2015-09-13 17:34:17 +08:00
|
|
|
enum Direction { Left, Right, Both };
|
|
|
|
|
|
|
|
Relationship(RelationshipSpecs* specs, Direction direction)
|
|
|
|
: specs(specs), direction(direction) {}
|
|
|
|
|
|
|
|
RelationshipSpecs* specs;
|
|
|
|
Direction direction;
|
2015-08-30 07:12:46 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|