include/prism/static_literals.h in prism-0.27.0 vs include/prism/static_literals.h in prism-0.28.0

- old
+ new

@@ -6,12 +6,11 @@ #ifndef PRISM_STATIC_LITERALS_H #define PRISM_STATIC_LITERALS_H #include "prism/defines.h" #include "prism/ast.h" -#include "prism/node.h" -#include "prism/parser.h" +#include "prism/util/pm_newline_list.h" #include <assert.h> #include <stdbool.h> /** @@ -90,16 +89,17 @@ } pm_static_literals_t; /** * Add a node to the set of static literals. * - * @param parser The parser that created the node. + * @param newline_list The list of newline offsets to use to calculate lines. + * @param start_line The line number that the parser starts on. * @param literals The set of static literals to add the node to. * @param node The node to add to the set. * @return A pointer to the node that is being overwritten, if there is one. */ -pm_node_t * pm_static_literals_add(const pm_parser_t *parser, pm_static_literals_t *literals, pm_node_t *node); +pm_node_t * pm_static_literals_add(const pm_newline_list_t *newline_list, int32_t start_line, pm_static_literals_t *literals, pm_node_t *node); /** * Free the internal memory associated with the given static literals set. * * @param literals The set of static literals to free. @@ -108,11 +108,13 @@ /** * Create a string-based representation of the given static literal. * * @param buffer The buffer to write the string to. - * @param parser The parser that created the node. + * @param newline_list The list of newline offsets to use to calculate lines. + * @param start_line The line number that the parser starts on. + * @param encoding_name The name of the encoding of the source being parsed. * @param node The node to create a string representation of. */ -PRISM_EXPORTED_FUNCTION void pm_static_literal_inspect(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *node); +PRISM_EXPORTED_FUNCTION void pm_static_literal_inspect(pm_buffer_t *buffer, const pm_newline_list_t *newline_list, int32_t start_line, const char *encoding_name, const pm_node_t *node); #endif