43
43
* The prism version and the serialization format.
44
44
*
45
45
* @returns The prism version as a constant string.
46
+ * \public \memberof pm_parser
46
47
*/
47
48
PRISM_EXPORTED_FUNCTION const char * pm_version (void );
48
49
@@ -53,6 +54,7 @@ PRISM_EXPORTED_FUNCTION const char * pm_version(void);
53
54
* @param source The source to parse.
54
55
* @param size The size of the source.
55
56
* @param options The optional options to use when parsing.
57
+ * \public \memberof pm_parser
56
58
*/
57
59
PRISM_EXPORTED_FUNCTION void pm_parser_init (pm_parser_t * parser , const uint8_t * source , size_t size , const pm_options_t * options );
58
60
@@ -62,13 +64,15 @@ PRISM_EXPORTED_FUNCTION void pm_parser_init(pm_parser_t *parser, const uint8_t *
62
64
*
63
65
* @param parser The parser to register the callback with.
64
66
* @param callback The callback to register.
67
+ * \public \memberof pm_parser
65
68
*/
66
69
PRISM_EXPORTED_FUNCTION void pm_parser_register_encoding_changed_callback (pm_parser_t * parser , pm_encoding_changed_callback_t callback );
67
70
68
71
/**
69
72
* Free any memory associated with the given parser.
70
73
*
71
74
* @param parser The parser to free.
75
+ * \public \memberof pm_parser
72
76
*/
73
77
PRISM_EXPORTED_FUNCTION void pm_parser_free (pm_parser_t * parser );
74
78
@@ -77,13 +81,15 @@ PRISM_EXPORTED_FUNCTION void pm_parser_free(pm_parser_t *parser);
77
81
*
78
82
* @param parser The parser to use.
79
83
* @return The AST representing the source.
84
+ * \public \memberof pm_parser
80
85
*/
81
86
PRISM_EXPORTED_FUNCTION pm_node_t * pm_parse (pm_parser_t * parser );
82
87
83
88
/**
84
- * This function is used in pm_parse_stream to retrieve a line of input from a
89
+ * This function is used in pm_parse_stream() to retrieve a line of input from a
85
90
* stream. It closely mirrors that of fgets so that fgets can be used as the
86
91
* default implementation.
92
+ * \public \memberof pm_parser
87
93
*/
88
94
typedef char * (pm_parse_stream_fgets_t )(char * string , int size , void * stream );
89
95
@@ -96,6 +102,7 @@ typedef char * (pm_parse_stream_fgets_t)(char *string, int size, void *stream);
96
102
* @param fgets The function to use to read from the stream.
97
103
* @param options The optional options to use when parsing.
98
104
* @return The AST representing the source.
105
+ * \public \memberof pm_parser
99
106
*/
100
107
PRISM_EXPORTED_FUNCTION pm_node_t * pm_parse_stream (pm_parser_t * parser , pm_buffer_t * buffer , void * stream , pm_parse_stream_fgets_t * fgets , const pm_options_t * options );
101
108
@@ -112,6 +119,7 @@ PRISM_EXPORTED_FUNCTION pm_node_t * pm_parse_stream(pm_parser_t *parser, pm_buff
112
119
* @param stream The stream to parse.
113
120
* @param fgets The function to use to read from the stream.
114
121
* @param data The optional data to pass to the parser.
122
+ * \public \memberof pm_buffer_t
115
123
*/
116
124
PRISM_EXPORTED_FUNCTION void pm_serialize_parse_stream (pm_buffer_t * buffer , void * stream , pm_parse_stream_fgets_t * fgets , const char * data );
117
125
@@ -121,6 +129,7 @@ PRISM_EXPORTED_FUNCTION void pm_serialize_parse_stream(pm_buffer_t *buffer, void
121
129
* @param parser The parser to serialize.
122
130
* @param list The list of comments to serialize.
123
131
* @param buffer The buffer to serialize to.
132
+ * \public \memberof pm_buffer_t
124
133
*/
125
134
void pm_serialize_comment_list (pm_parser_t * parser , pm_list_t * list , pm_buffer_t * buffer );
126
135
@@ -129,6 +138,7 @@ void pm_serialize_comment_list(pm_parser_t *parser, pm_list_t *list, pm_buffer_t
129
138
*
130
139
* @param encoding The encoding to serialize.
131
140
* @param buffer The buffer to serialize to.
141
+ * \public \memberof pm_buffer_t
132
142
*/
133
143
void pm_serialize_encoding (const pm_encoding_t * encoding , pm_buffer_t * buffer );
134
144
@@ -138,6 +148,7 @@ void pm_serialize_encoding(const pm_encoding_t *encoding, pm_buffer_t *buffer);
138
148
* @param parser The parser to serialize.
139
149
* @param node The node to serialize.
140
150
* @param buffer The buffer to serialize to.
151
+ * \public \memberof pm_buffer_t
141
152
*/
142
153
void pm_serialize_content (pm_parser_t * parser , pm_node_t * node , pm_buffer_t * buffer );
143
154
@@ -147,6 +158,7 @@ void pm_serialize_content(pm_parser_t *parser, pm_node_t *node, pm_buffer_t *buf
147
158
* @param parser The parser to serialize.
148
159
* @param node The node to serialize.
149
160
* @param buffer The buffer to serialize to.
161
+ * \public \memberof pm_buffer_t
150
162
*/
151
163
PRISM_EXPORTED_FUNCTION void pm_serialize (pm_parser_t * parser , pm_node_t * node , pm_buffer_t * buffer );
152
164
@@ -157,6 +169,7 @@ PRISM_EXPORTED_FUNCTION void pm_serialize(pm_parser_t *parser, pm_node_t *node,
157
169
* @param source The source to parse.
158
170
* @param size The size of the source.
159
171
* @param data The optional data to pass to the parser.
172
+ * \public \memberof pm_buffer_t
160
173
*/
161
174
PRISM_EXPORTED_FUNCTION void pm_serialize_parse (pm_buffer_t * buffer , const uint8_t * source , size_t size , const char * data );
162
175
@@ -167,6 +180,7 @@ PRISM_EXPORTED_FUNCTION void pm_serialize_parse(pm_buffer_t *buffer, const uint8
167
180
* @param source The source to parse.
168
181
* @param size The size of the source.
169
182
* @param data The optional data to pass to the parser.
183
+ * \public \memberof pm_buffer_t
170
184
*/
171
185
PRISM_EXPORTED_FUNCTION void pm_serialize_parse_comments (pm_buffer_t * buffer , const uint8_t * source , size_t size , const char * data );
172
186
@@ -177,6 +191,7 @@ PRISM_EXPORTED_FUNCTION void pm_serialize_parse_comments(pm_buffer_t *buffer, co
177
191
* @param size The size of the source.
178
192
* @param buffer The buffer to serialize to.
179
193
* @param data The optional data to pass to the lexer.
194
+ * \public \memberof pm_buffer_t
180
195
*/
181
196
PRISM_EXPORTED_FUNCTION void pm_serialize_lex (pm_buffer_t * buffer , const uint8_t * source , size_t size , const char * data );
182
197
@@ -188,6 +203,7 @@ PRISM_EXPORTED_FUNCTION void pm_serialize_lex(pm_buffer_t *buffer, const uint8_t
188
203
* @param source The source to parse.
189
204
* @param size The size of the source.
190
205
* @param data The optional data to pass to the parser.
206
+ * \public \memberof pm_buffer_t
191
207
*/
192
208
PRISM_EXPORTED_FUNCTION void pm_serialize_parse_lex (pm_buffer_t * buffer , const uint8_t * source , size_t size , const char * data );
193
209
@@ -200,6 +216,7 @@ PRISM_EXPORTED_FUNCTION void pm_serialize_parse_lex(pm_buffer_t *buffer, const u
200
216
* @param size The size of the source.
201
217
* @param data The optional data to pass to the parser.
202
218
* @return True if the source parses without errors or warnings.
219
+ * \public \static \memberof pm_parser
203
220
*/
204
221
PRISM_EXPORTED_FUNCTION bool pm_parse_success_p (const uint8_t * source , size_t size , const char * data );
205
222
@@ -208,6 +225,7 @@ PRISM_EXPORTED_FUNCTION bool pm_parse_success_p(const uint8_t *source, size_t si
208
225
*
209
226
* @param token_type The token type to convert to a string.
210
227
* @return A string representation of the given token type.
228
+ * \public \memberof pm_parser
211
229
*/
212
230
PRISM_EXPORTED_FUNCTION const char * pm_token_type_name (pm_token_type_t token_type );
213
231
@@ -229,6 +247,7 @@ const char * pm_token_type_human(pm_token_type_t token_type);
229
247
* @param buffer The buffer to serialize to.
230
248
* @param parser The parser that parsed the node.
231
249
* @param node The node to serialize.
250
+ * \public \memberof pm_buffer_t
232
251
*/
233
252
PRISM_EXPORTED_FUNCTION void pm_dump_json (pm_buffer_t * buffer , const pm_parser_t * parser , const pm_node_t * node );
234
253
0 commit comments