rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.34k stars 740 forks source link

Support for "Concise Data Definition Language", or CDDL #1339

Open Progdrasil opened 5 years ago

Progdrasil commented 5 years ago

Describe the solution you'd like It would be useful to add syntax highlighting support for CDDL as defined by RFC 8610. It is a definition language similar to Protobuf, Cap’n Proto, FlatBuffers, Json Schema, etc. but for the CBOR data format.

Additional context They have an example of syntax highlighting on the CBOR tools website. Their snippet is pasted below for reference, which at time of writing does not have syntax highlighting.

reputation-object = {
  application: tstr
  reputons: [* reputon]
}

reputon = {
  rater: tstr
  assertion: tstr
  rated: tstr
  rating: float16
  ? confidence: float16
  ? normal-rating: float16
  ? sample-size: uint
  ? generated: uint
  ? expires: uint
  * tstr: any
}
pyrmont commented 5 years ago

@Progdrasil Thanks for filing the issue!

Rouge relies on the support of our community for new language lexers. We always encourage new language lexer submissions to be submitted via PR. If you'd like to contribute, please feel free. This guide is a good place to start :)