aboutsummaryrefslogtreecommitdiffstats
path: root/src/describe.c
AgeCommit message (Collapse)AuthorFilesLines
2022-01-28Remove SERD_NO_INLINE_OBJECTSDavid Robillard1-19/+8
This seems like pointless complexity now, since it's easy to just write simply ordered statements yourself.
2022-01-28Put rdf:type properties first when pretty-printingDavid Robillard1-66/+114
This is a common convention in Turtle and TriG because the special "a" syntax for rdf type as the first property looks nice, makes things easier to read, and can be useful for streaming implementations because the type of the instance is known before reading its properties. Also significantly clean up the pretty-printing implementation in the process.
2022-01-28Fix pretty-printing nested empty lists and add test suiteDavid Robillard1-4/+7
The earlier "test" was just hitting the code without actually checking the output. This new suite is a set of pretty-printed documents which serd must reproduce from a model exactly to pass. This should make it easy to add cases in the future, since each case is just a document, as it should look.
2022-01-28Add assertions for all non-null pointers in the public APIDavid Robillard1-0/+2
Clang issues warnings at build time based on the SERD_NONNULL annotations, which is a much better approach in general. However, it does not cover cases where the API is being used with another compiler, or without a compiler that can statically check things at all (such as Python or other dynamic language bindings). In those situations, getting a clear assertion message is a lot less confusing than a random crash somewhere in serd, and it makes it clear that the bug is in the caller, so I think it's worth the tedious verbosity.
2022-01-14Add modelDavid Robillard1-0/+266