| 93 | } |
| 94 | |
| 95 | static const char *skip_comments(const char *json) |
| 96 | { |
| 97 | if (json == NULL) { |
| 98 | fatal("json is NULL"); |
| 99 | return NULL; |
| 100 | } |
| 101 | |
| 102 | if (*json == '/') { |
| 103 | ++json; |
| 104 | if (*json == '/') { |
| 105 | NEXT_OR_RETURN(json, '/', NULL); |
| 106 | while (*json && *json != '\n') |
| 107 | ++json; |
| 108 | } else if (*json == '*') { |
| 109 | ++json; |
| 110 | while (*json && *json != '*') |
| 111 | ++json; |
| 112 | NEXT_OR_RETURN(json, '*', NULL); |
| 113 | NEXT_OR_RETURN(json, '/', NULL); |
| 114 | } else { |
| 115 | fatal("Bad comment"); |
| 116 | return NULL; |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | return json; |
| 121 | } |
| 122 | |
| 123 | static const char *skip_spaces(const char *json) |
| 124 | { |
no test coverage detected