aboutsummaryrefslogtreecommitdiffstats
path: root/prism/prism.h
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-10-27 13:55:48 -0400
committergit <svn-admin@ruby-lang.org>2023-10-27 18:09:14 +0000
commitc201dbc0ada03b985e297d22d6dfa24b7bac12ce (patch)
tree6f0bd1a0ae9ff16ba11a134bcd6e9f7a6db0a0a7 /prism/prism.h
parentdf10e10314e860c73c57e6bf43cf84aac7686270 (diff)
downloadruby-c201dbc0ada03b985e297d22d6dfa24b7bac12ce.tar.gz
[ruby/prism] Prism.parse_inline_comments
https://github.com/ruby/prism/commit/5b72f84480
Diffstat (limited to 'prism/prism.h')
-rw-r--r--prism/prism.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/prism/prism.h b/prism/prism.h
index 99a6a7e2eb..227b233ea1 100644
--- a/prism/prism.h
+++ b/prism/prism.h
@@ -30,6 +30,10 @@
void pm_serialize_content(pm_parser_t *parser, pm_node_t *node, pm_buffer_t *buffer);
+void pm_serialize_encoding(pm_encoding_t *encoding, pm_buffer_t *buffer);
+
+void pm_serialize_comment_list(pm_parser_t *parser, pm_list_t *list, pm_buffer_t *buffer);
+
void pm_parser_metadata(pm_parser_t *parser, const char *metadata);
// The prism version and the serialization format.
@@ -61,6 +65,10 @@ PRISM_EXPORTED_FUNCTION void pm_serialize(pm_parser_t *parser, pm_node_t *node,
// Parse the given source to the AST and serialize the AST to the given buffer.
PRISM_EXPORTED_FUNCTION void pm_parse_serialize(const uint8_t *source, size_t size, pm_buffer_t *buffer, const char *metadata);
+// Parse and serialize the inline comments in the given source to the given
+// buffer.
+PRISM_EXPORTED_FUNCTION void pm_parse_serialize_inline_comments(const uint8_t *source, size_t size, pm_buffer_t *buffer, const char *metadata);
+
// Lex the given source and serialize to the given buffer.
PRISM_EXPORTED_FUNCTION void pm_lex_serialize(const uint8_t *source, size_t size, const char *filepath, pm_buffer_t *buffer);