bterlson / cadl-rdfs

A cadl to rdfs emitter
0 stars 0 forks source link

Implement ENUM #4

Open mspaulik opened 1 year ago

mspaulik commented 1 year ago

Test the following possible enum declarations will get translated to RDF.

enum Direction {
  North,
  East,
  South,
  West,
}
enum Direction {
  North: "north",
  East: "east",
  South: "south",
  West: "west",
}
enum Foo {
  One: 1,
  Ten: 10,
  Hundred: 100,
  Thousand: 1000,
}
enum Hour {
  Zero = 0,
  Quarter = 0.25,
  Half = 0.5,
  ThreeQuarter = 0.75,
}

Another possibility is composing enums:

enum DirectionExt {
  ...Direction,
  "North East",
  "North West",
  "South East",
  "South West",
}
mspaulik commented 1 year ago

fix range