summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-01-02 13:59:20 -0500
committergit <svn-admin@ruby-lang.org>2024-01-02 18:59:26 +0000
commit165deec5fef5076bca99c038caf8c9da34abe0fd (patch)
tree52cff8de2bf8ad9952f82231b3cfaab43f42fe2e
parent29026404a60c670887d3e8f6cbfbf1e012b9e4f0 (diff)
[ruby/prism] Document the version option on prism parse
https://github.com/ruby/prism/commit/eddd72a8ef
-rw-r--r--prism/extension.c4
1 files changed, 4 insertions, 0 deletions
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.
*/