aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-13WIP: logDavid Robillard1-8/+8
2019-04-13WIP: Add support for writing terse collectionsDavid Robillard1-12/+23
2019-04-13Tolerate lack of predicate when context is poppedDavid Robillard1-1/+2
2019-04-13Reset writer to empty when finished to avoid spurious blank linesDavid Robillard1-0/+1
2019-04-13Pass context flags to write_sep()David Robillard1-22/+24
2019-04-13Add initial flags to write contextDavid Robillard1-13/+16
2019-04-13Factor out pushing writer contextDavid Robillard1-29/+34
2019-04-13Strengthen writer statement preconditionsDavid Robillard1-1/+3
2019-04-13Add option for writing terse output without newlinesDavid Robillard1-4/+8
2019-04-13Factor out writing top level separatorDavid Robillard1-6/+10
2019-04-13Rename SERD_STYLE_ASCII to SERD_WRITE_ASCIIDavid Robillard1-1/+1
2019-04-13Simplify writer statement validity checkingDavid Robillard1-3/+2
2019-04-13Fix character conversion warningsDavid Robillard1-1/+1
2019-04-13Fix cast alignment warningDavid Robillard1-4/+5
2019-04-13Fix implicit signed conversions for writer indentDavid Robillard1-3/+3
2019-04-13Use consistent naming for function typesDavid Robillard1-5/+5
2019-04-13Add Env to SinkDavid Robillard1-33/+28
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-04-13Rename SerdStyle to SerdWriterFlagsDavid Robillard1-9/+9
2019-04-13Rename SerdError to SerdMessageDavid Robillard1-19/+19
Towards more general usage for all types of logging.
2019-04-13Fix writer flags typeDavid Robillard1-18/+18
2019-04-13Use simpler names for statement flagsDavid Robillard1-12/+12
2019-04-13Simplify streaming API and improve pretty printingDavid Robillard1-108/+143
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-04-13Cache commonly used nodes in the worldDavid Robillard1-10/+8
2019-04-13Separate ByteSink from WriterDavid Robillard1-7/+6
2019-04-13Expose SerdByteSink in public APIDavid Robillard1-5/+4
2019-04-13Simplify writer style optionsDavid Robillard1-2/+2
2019-04-13Avoid writing invalid prefixed name prefixesDavid Robillard1-1/+2
2019-04-13Separate style enum from style flags typesDavid Robillard1-1/+1
2019-04-13Make SerdSink opaqueDavid Robillard1-0/+1
2019-04-13Simplify SerdEnv APIDavid Robillard1-4/+7
2019-04-13Make 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-04-13Move SerdField to public APIDavid Robillard1-46/+40
2019-04-13Use 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-04-13Clean up node construction APIDavid Robillard1-12/+7
2019-04-13Clean up includes and improve source file separationDavid Robillard1-7/+11
2019-04-13Move system utilities to separate source filesDavid Robillard1-0/+1
2019-04-13Move error handling to worldDavid Robillard1-21/+6
2019-04-13Add SerdWorld for shared library stateDavid Robillard1-11/+5
2019-04-13Add SerdSink interface and hide individual function implementationsDavid Robillard1-2/+21
2019-04-13Bring read/write interface closer to C standardDavid Robillard1-14/+13
2019-04-13Clean up and separate internal headersDavid Robillard1-0/+14
2019-04-13Merge datatype and/or language into nodeDavid Robillard1-28/+20
This moves closer to the sord API, and is more convenient in most cases.
2019-04-13Make nodes opaqueDavid Robillard1-71/+78
2019-04-13Use opaque node APIDavid Robillard1-29/+39
2019-04-13Rename SerdChunk to SerdStringViewDavid Robillard1-5/+5
2019-04-13Use char* for strings in public APIDavid Robillard1-20/+20
The constant casting just makes user code a mess, for no benefit.
2019-04-13Remove useless character countingDavid Robillard1-4/+3
2019-04-13Use 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