summaryrefslogtreecommitdiff
path: root/src/node.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-11-19 17:08:03 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-11-19 17:08:03 +0100
commit7f8a0d96dd3ab34b4f8ec233fd243f53a01a4e6a (patch)
treee710aa9ab288bef3bc8a6a3a6e6c52baece3e1b3 /src/node.c
parentfd13d0211f33a134a4c73882f1f2eaa423f1794a (diff)
Accessors for start_line, start_column, end_line
These are read-only as they're only metadata returned by the parser.
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index f2649e9..8b8b988 100644
--- a/src/node.c
+++ b/src/node.c
@@ -303,6 +303,21 @@ cmark_node_set_title(cmark_node *node, const char *title) {
return 0;
}
+int
+cmark_node_get_start_line(cmark_node *node) {
+ return node->start_line;
+}
+
+int
+cmark_node_get_start_column(cmark_node *node) {
+ return node->start_column;
+}
+
+int
+cmark_node_get_end_line(cmark_node *node) {
+ return node->end_line;
+}
+
static inline bool
S_is_block(cmark_node *node) {
return node->type >= CMARK_NODE_FIRST_BLOCK