diff --git a/include/prism/defines.h b/include/prism/defines.h index f697b9e5547..457a8502f89 100644 --- a/include/prism/defines.h +++ b/include/prism/defines.h @@ -1,7 +1,7 @@ #ifndef PRISM_DEFINES_H #define PRISM_DEFINES_H -// This file should be included first by any *.h or *.c in prism +// This file should be included first by any *.h or *.c in prism. #include #include diff --git a/include/prism/prettyprint.h b/include/prism/prettyprint.h index 04596793d47..9ae2397e636 100644 --- a/include/prism/prettyprint.h +++ b/include/prism/prettyprint.h @@ -9,7 +9,13 @@ #include "prism/parser.h" #include "prism/util/pm_buffer.h" -// Pretty-prints the AST represented by the given node to the given buffer. +/** + * Pretty-prints the AST represented by the given node to the given buffer. + * + * @param output_buffer The buffer to write the pretty-printed AST to. + * @param parser The parser that parsed the AST. + * @param node The root node of the AST to pretty-print. + */ PRISM_EXPORTED_FUNCTION void pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node); #endif diff --git a/include/prism/version.h b/include/prism/version.h index 9a72a1dbdfa..25ee409c74f 100644 --- a/include/prism/version.h +++ b/include/prism/version.h @@ -1,4 +1,19 @@ +/** + * The major version of the Prism library as an int. + */ #define PRISM_VERSION_MAJOR 0 + +/** + * The minor version of the Prism library as an int. + */ #define PRISM_VERSION_MINOR 16 + +/** + * The patch version of the Prism library as an int. + */ #define PRISM_VERSION_PATCH 0 + +/** + * The version of the Prism library as a constant string. + */ #define PRISM_VERSION "0.16.0" diff --git a/templates/src/prettyprint.c.erb b/templates/src/prettyprint.c.erb index 2309a86f1f8..d5bf196e0b5 100644 --- a/templates/src/prettyprint.c.erb +++ b/templates/src/prettyprint.c.erb @@ -177,7 +177,9 @@ prettyprint_node(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm } } -// Pretty-prints the AST represented by the given node to the given buffer. +/** + * Pretty-prints the AST represented by the given node to the given buffer. + */ PRISM_EXPORTED_FUNCTION void pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node) { pm_buffer_t prefix_buffer = { 0 };