kdl-org / kdl

the kdl document language specifications
https://kdl.dev
Other
1.1k stars 61 forks source link

Multiple annotations #244

Closed IceDragon200 closed 2 years ago

IceDragon200 commented 2 years ago

So annotations, the primary README briefly touches on it.

What's interesting, originally it seems to have been used for type annotating:

(date)"2021-10-24"

But recently reading the data model https://github.com/kdl-org/kdl/issues/225, it now goes by the name 'tag' which suggests it is now a general purpose value.

So would it make sense to allow multiple tags or annotations?

(AI)(Enemy)entity {
  name "Box"
  position 0 0
}

(AI2)(Enemy)entity {
  name "Goblin"
  position 0 1
}

(Controllable)(Player)entity {
  name "Player"
  position 3 3
}

Not the perfect example, but I think it gets the point across.

larsgw commented 2 years ago

For values it is still used for type annotating, for entities it is about indicating the relationship between a node and its parent node (or the root document). In your example, I think most of the tags/annotations could also be properties (Controllable at least).