Skip to content

Commit 53ea199

Browse files
authored
Merge pull request #3640 from ruby/linkify-docs
Add links to code refs in docs
2 parents 8955403 + d2d9a1f commit 53ea199

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

include/prism.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,10 @@ PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_method_name(const uint
322322
* to want to use and be aware of are:
323323
*
324324
* * `pm_parser_t` - the main parser structure
325-
* * `pm_parser_init` - initialize a parser
326-
* * `pm_parse` - parse and return the root node
327-
* * `pm_node_destroy` - deallocate the root node returned by `pm_parse`
328-
* * `pm_parser_free` - free the internal memory of the parser
325+
* * `pm_parser_init()` - initialize a parser
326+
* * `pm_parse()` - parse and return the root node
327+
* * `pm_node_destroy()` - deallocate the root node returned by `pm_parse()`
328+
* * `pm_parser_free()` - free the internal memory of the parser
329329
*
330330
* Putting all of this together would look something like:
331331
*
@@ -342,8 +342,8 @@ PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_method_name(const uint
342342
* }
343343
* ```
344344
*
345-
* All of the nodes "inherit" from `pm_node_t` by embedding those structures as
346-
* their first member. This means you can downcast and upcast any node in the
345+
* All of the nodes "inherit" from `pm_node_t` by embedding those structures
346+
* as their first member. This means you can downcast and upcast any node in the
347347
* tree to a `pm_node_t`.
348348
*
349349
* @section serializing Serializing
@@ -355,9 +355,9 @@ PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_method_name(const uint
355355
* use and be aware of are:
356356
*
357357
* * `pm_buffer_t` - a small buffer object that will hold the serialized AST
358-
* * `pm_buffer_free` - free the memory associated with the buffer
359-
* * `pm_serialize` - serialize the AST into a buffer
360-
* * `pm_serialize_parse` - parse and serialize the AST into a buffer
358+
* * `pm_buffer_free()` - free the memory associated with the buffer
359+
* * `pm_serialize()` - serialize the AST into a buffer
360+
* * `pm_serialize_parse()` - parse and serialize the AST into a buffer
361361
*
362362
* Putting all of this together would look something like:
363363
*
@@ -375,7 +375,7 @@ PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_method_name(const uint
375375
* @section inspecting Inspecting
376376
*
377377
* Prism provides the ability to inspect the AST by pretty-printing nodes. You
378-
* can do this with the `pm_prettyprint` function, which you would use like:
378+
* can do this with the `pm_prettyprint()` function, which you would use like:
379379
*
380380
* ```c
381381
* void prettyprint(const uint8_t *source, size_t length) {

include/prism/util/pm_string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ typedef struct {
4545
/** This is a slice of another string, and should not be freed. */
4646
PM_STRING_SHARED,
4747

48-
/** This string owns its memory, and should be freed using `pm_string_free`. */
48+
/** This string owns its memory, and should be freed using `pm_string_free()`. */
4949
PM_STRING_OWNED,
5050

5151
#ifdef PRISM_HAS_MMAP
52-
/** This string is a memory-mapped file, and should be freed using `pm_string_free`. */
52+
/** This string is a memory-mapped file, and should be freed using `pm_string_free()`. */
5353
PM_STRING_MAPPED
5454
#endif
5555
} type;

0 commit comments

Comments
 (0)