aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
AgeCommit message (Collapse)AuthorFilesLines
2019-12-20Strengthen writer statement preconditionsDavid Robillard1-1/+3
2019-12-20Add option for writing terse output without newlinesDavid Robillard1-4/+8
2019-12-20Factor out writing top level separatorDavid Robillard1-6/+10
2019-12-20Rename SERD_STYLE_ASCII to SERD_WRITE_ASCIIDavid Robillard1-1/+1
2019-12-20Simplify writer statement validity checkingDavid Robillard1-3/+2
2019-12-20Fix various warnings and conversion issuesDavid Robillard1-8/+9
2019-12-19Use consistent naming for function typesDavid Robillard1-4/+4
2019-12-19Add extensible logging APIDavid Robillard1-10/+10
2019-12-19Add Env to SinkDavid Robillard1-38/+27
This isn't technically necessary for any sink, but is a pattern common to every sink implementation in serd, so having it here reduces boilerplate and parameters in user code.
2019-12-19Rename SerdStyle to SerdWriterFlagsDavid Robillard1-26/+26
2019-12-19Fix writer flags typeDavid Robillard1-18/+18
2019-12-19Use simpler names for statement flagsDavid Robillard1-12/+12
2019-12-19Simplify streaming API and improve pretty printingDavid Robillard1-108/+144
This removes the obligation from the caller to correctly maintain flags to describe the current anonymous context, instead making the writer handle this itself as much as possible. Flags remain for the cases the writer can not infer from context: the start of anonymous subject and object nodes.
2019-12-19Cache commonly used nodes in the worldDavid Robillard1-10/+8
2019-12-19Separate ByteSink from WriterDavid Robillard1-7/+6
2019-12-19Expose SerdByteSink in public APIDavid Robillard1-5/+4
2019-12-19Simplify writer style optionsDavid Robillard1-2/+2
2019-12-19Avoid writing invalid prefixed name prefixesDavid Robillard1-1/+2
2019-12-19Separate style enum from style flags typesDavid Robillard1-1/+1
2019-12-19Make SerdSink opaqueDavid Robillard1-0/+1
2019-12-19Simplify SerdEnv APIDavid Robillard1-4/+7
2019-12-19Make statement sink take a statement rather than nodesDavid Robillard1-6/+8
This makes the interface more extensible, towards associating more information with statements. The serd_sink_write_nodes wrapper remains so that user code does not need to allocate in order to write statement.
2019-12-19Move SerdField to public APIDavid Robillard1-46/+40
2019-12-19Use a fixed-size reader stackDavid Robillard1-1/+1
This improves performance, and makes the reader more suitable for embedded or network-facing applications, at the cost of requiring the user to specify a maximum stack size.
2019-12-19Clean up node construction APIDavid Robillard1-12/+7
2019-12-19Clean up includes and improve source file separationDavid Robillard1-7/+11
2019-12-19Move system utilities to separate source filesDavid Robillard1-0/+1
2019-12-19Move error handling to worldDavid Robillard1-21/+6
2019-12-19Add SerdWorld for shared library stateDavid Robillard1-11/+5
2019-12-19Add SerdSink interface and hide individual function implementationsDavid Robillard1-2/+21
2019-12-19Bring read/write interface closer to C standardDavid Robillard1-14/+13
2019-12-19Clean up and separate internal headersDavid Robillard1-0/+14
2019-12-19Merge datatype and/or language into nodeDavid Robillard1-28/+20
This moves closer to the sord API, and is more convenient in most cases.
2019-12-19Make nodes opaqueDavid Robillard1-71/+74
2019-12-19Use opaque node APIDavid Robillard1-29/+39
2019-12-18Rename SerdChunk to SerdStringViewDavid Robillard1-5/+5
2019-12-18Use char* for strings in public APIDavid Robillard1-20/+20
The constant casting just makes user code a mess, for no benefit.
2019-12-18Remove useless character countingDavid Robillard1-4/+3
2019-12-14Use SerdBuffer for mutable buffersDavid Robillard1-7/+7
This avoids const violations from abusing SerdChunk as a mutable buffer for string sinks.
2019-01-05Fix unused parameter warningsDavid Robillard1-2/+1
2018-06-15Remove redundant SERD_API declarationsDavid Robillard1-14/+0
2018-06-10Remove syntax assumptions from SerdEnv implementationDavid Robillard1-1/+15
2018-05-27Clarify errors returned by serd_env_expand()David Robillard1-5/+5
2018-02-04Factor out syntax-specific reader implementationDavid Robillard1-8/+0
2017-11-05Factor out namespace definesDavid Robillard1-3/+0
2017-09-23Use more efficient stack allocation and growth policiesDavid Robillard1-1/+1
2017-08-29Fix writing of corrupt UTF-8David Robillard1-8/+7
2017-07-30Move parse_utf8_char to shared internal headerDavid Robillard1-20/+1
2017-07-30Cleanup: Add push_bytes function to reduce code verbosityDavid Robillard1-2/+0
2017-07-10Cleanup: Separate writer code into smaller functionsDavid Robillard1-154/+207