aboutsummaryrefslogtreecommitdiffstats
path: root/yarp
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2023-07-07 12:54:18 -0400
committergit <svn-admin@ruby-lang.org>2023-07-07 17:46:46 +0000
commit31f83a6feaeed8c82ed571d17ab33755a75cbb18 (patch)
tree9e67e01b5a95a6e352caeb7c3654ba6ae9bc54fb /yarp
parent61efa9c823263697b1625b411fff33d8dc3cd11d (diff)
downloadruby-31f83a6feaeed8c82ed571d17ab33755a75cbb18.tar.gz
[ruby/yarp] Add source to ParseResult
https://github.com/ruby/yarp/commit/f3802e03e0
Diffstat (limited to 'yarp')
-rw-r--r--yarp/extension.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/yarp/extension.c b/yarp/extension.c
index f0d22c7f8c..034be79e4d 100644
--- a/yarp/extension.c
+++ b/yarp/extension.c
@@ -391,10 +391,11 @@ lex_input(input_t *input, const char *filepath) {
lex_data.tokens,
parser_comments(&parser, source),
parser_errors(&parser, lex_data.encoding, source),
- parser_warnings(&parser, lex_data.encoding, source)
+ parser_warnings(&parser, lex_data.encoding, source),
+ source
};
- VALUE result = rb_class_new_instance(4, result_argv, rb_cYARPParseResult);
+ VALUE result = rb_class_new_instance(5, result_argv, rb_cYARPParseResult);
yp_node_destroy(&parser, node);
yp_parser_free(&parser);
@@ -446,10 +447,11 @@ parse_input(input_t *input, const char *filepath) {
yp_ast_new(&parser, node, encoding),
parser_comments(&parser, source),
parser_errors(&parser, encoding, source),
- parser_warnings(&parser, encoding, source)
+ parser_warnings(&parser, encoding, source),
+ source
};
- VALUE result = rb_class_new_instance(4, result_argv, rb_cYARPParseResult);
+ VALUE result = rb_class_new_instance(5, result_argv, rb_cYARPParseResult);
yp_node_destroy(&parser, node);
yp_parser_free(&parser);