aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/serd/serd.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index c09494bc..7a280b64 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -1410,6 +1410,27 @@ serd_nodes_intern(SerdNodes* SERD_NONNULL nodes,
const SerdNode* SERD_NULLABLE node);
/**
+ Make a simple "token" node.
+
+ "Token" is just a shorthand used in this API to refer to a node that is not
+ a typed or tagged literal, that is, a node that is just one string. This
+ can be used to make URIs, blank nodes, variables, and simple string
+ literals.
+
+ Note that string literals constructed with this function will have no flags
+ set, and so will be written as "short" literals (not triple-quoted). To
+ construct long literals, use the more advanced serd_nodes_literal() with the
+ #SERD_IS_LONG flag.
+
+ A new node will be added if an equivalent node is not already in the set.
+*/
+SERD_API
+const SerdNode* SERD_ALLOCATED
+serd_nodes_token(SerdNodes* SERD_NONNULL nodes,
+ SerdNodeType type,
+ SerdStringView string);
+
+/**
Make a string node.
A new node will be added if an equivalent node is not already in the set.