Skip to content

Commit

Permalink
feat(map): redesign of metamodel for map key and map value types (#6)
Browse files Browse the repository at this point in the history
* feat(map): redesign of metamodel for map key and map value types

Signed-off-by: jonathan.casey <[email protected]>

* feat(map): updates metamodel AST

Signed-off-by: jonathan.casey <[email protected]>

---------

Signed-off-by: jonathan.casey <[email protected]>
  • Loading branch information
jonathan-casey authored Aug 9, 2023
1 parent ddf8f56 commit ef7c38a
Show file tree
Hide file tree
Showing 2 changed files with 1,311 additions and 1,188 deletions.
33 changes: 25 additions & 8 deletions lib/metamodel.cto
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,41 @@ abstract concept Declaration {
o Range location optional
}

abstract concept MapKeyType {
o Decorator[] decorators optional
o Range location optional
}

abstract concept MapValueType {
o Decorator[] decorators optional
o Range location optional
}

concept MapDeclaration extends Declaration {
o MapKeyType key
o AggregateValueType value
o MapValueType value
}

concept MapKeyType {
concept StringMapKeyType extends MapKeyType {}
concept DateTimeMapKeyType extends MapKeyType {}

concept ObjectMapKeyType extends MapKeyType {
o TypeIdentifier type
o Decorator[] decorators optional
o Range location optional
}

concept AggregateValueType {
concept BooleanMapValueType extends MapValueType {}
concept DateTimeMapValueType extends MapValueType {}
concept StringMapValueType extends MapValueType {}
concept IntegerMapValueType extends MapValueType {}
concept LongMapValueType extends MapValueType {}
concept DoubleMapValueType extends MapValueType {}

concept ObjectMapValueType extends MapValueType {
o TypeIdentifier type
o Decorator[] decorators optional
o Range location optional
}

concept AggregateRelationshipValueType extends AggregateValueType {
concept RelationshipMapValueType extends MapValueType {
o TypeIdentifier type
}

concept EnumDeclaration extends Declaration {
Expand Down
Loading

0 comments on commit ef7c38a

Please sign in to comment.