From 5811ff4554da3d980ff32a83efa35ea1a4512484 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 12 Jan 2021 21:28:44 -0800 Subject: Adding comments --- json.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'json.c') diff --git a/json.c b/json.c index f7e34fe..22a3ae2 100644 --- a/json.c +++ b/json.c @@ -7,7 +7,9 @@ #include "types.h" // -// Print a match as JSON +// Helper function for json_match(). +// `comma` is used to track whether a comma will need to be printed before the +// next object or not. // static int _json_match(const char *text, match_t *m, int comma, int verbose) { @@ -41,6 +43,9 @@ static int _json_match(const char *text, match_t *m, int comma, int verbose) return 1; } +// +// Print a match object as a JSON object. +// void json_match(const char *text, match_t *m, int verbose) { _json_match(text, m, 0, verbose); -- cgit v1.2.3