lenscas / tealr

A wrapper around mlua to generate documentation, definition files and other helpers
69 stars 9 forks source link

improve the format used to store type information. #81

Closed lenscas closed 11 months ago

lenscas commented 11 months ago

This basically completely changes the format though it should be backwards compatible with the old format for readers.

The old format was very biased towards to teal's syntax and focused on layout.

This made it very hard to create definition files for anything other than teal.

It also made it very hard to get any meaningful information out of the types without parsing

And to top it off, forced the writer of the type to care about formatting/how the type ends up being laid out as.

The new format fixes this by only focusing on the types and what for type it is. Rather than allowing people to inject syntax in the type definitions.

There is however a function to turn the new format into the old one and the old format is still included.

So, for as long as readers don't mind extra fields they should be able to keep using the old fields as normal.