From 165deec5fef5076bca99c038caf8c9da34abe0fd Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Tue, 2 Jan 2024 13:59:20 -0500 Subject: [ruby/prism] Document the version option on prism parse https://github.com/ruby/prism/commit/eddd72a8ef --- prism/extension.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prism/extension.c b/prism/extension.c index 6dc1993657..84c8eacd94 100644 --- a/prism/extension.c +++ b/prism/extension.c @@ -646,6 +646,10 @@ parse_input(pm_string_t *input, const pm_options_t *options) { * has been set. This should be a boolean or nil. * * `verbose` - the current level of verbosity. This controls whether or not * the parser emits warnings. This should be a boolean or nil. + * * `version` - the version of prism that should be used to parse Ruby code. By + * default prism assumes you want to parse with the latest vesion of + * prism (which you can trigger with `nil` or `"latest"`). If you want to + * parse exactly as CRuby 3.3.0 would, then you can pass `"3.3.0"`. * * `scopes` - the locals that are in scope surrounding the code that is being * parsed. This should be an array of arrays of symbols or nil. */ -- cgit v1.2.3