Skip to content

Commit eddd72a

Browse files
committed
Document the version option on prism parse
1 parent 0f1ea0c commit eddd72a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/prism/extension.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,10 @@ parse_input(pm_string_t *input, const pm_options_t *options) {
646646
* has been set. This should be a boolean or nil.
647647
* * `verbose` - the current level of verbosity. This controls whether or not
648648
* the parser emits warnings. This should be a boolean or nil.
649+
* * `version` - the version of prism that should be used to parse Ruby code. By
650+
* default prism assumes you want to parse with the latest vesion of
651+
* prism (which you can trigger with `nil` or `"latest"`). If you want to
652+
* parse exactly as CRuby 3.3.0 would, then you can pass `"3.3.0"`.
649653
* * `scopes` - the locals that are in scope surrounding the code that is being
650654
* parsed. This should be an array of arrays of symbols or nil.
651655
*/

0 commit comments

Comments
 (0)