aboutsummaryrefslogtreecommitdiffstats
path: root/prism
diff options
context:
space:
mode:
authorHParker <HParker@github.com>2023-12-01 13:25:41 -0800
committerJemma Issroff <jemmaissroff@gmail.com>2023-12-05 12:17:14 -0500
commit9b76c7fc89460ed8e9be40e4037c1d68395c0f6d (patch)
treefc0b1638f528bafd00fce2e09bab32d5977c0947 /prism
parent19114014faf9e22c29c105df4d0b7af84c257366 (diff)
downloadruby-9b76c7fc89460ed8e9be40e4037c1d68395c0f6d.tar.gz
allow enabling Prism via flag or env var
Enable Prism using either --prism ruby --prism test.rb or via env var RUBY_PRISM=1 ruby test.rb
Diffstat (limited to 'prism')
-rw-r--r--prism/prism.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/prism/prism.h b/prism/prism.h
index 590cd74016..d55c4f2bfd 100644
--- a/prism/prism.h
+++ b/prism/prism.h
@@ -42,6 +42,17 @@
*/
PRISM_EXPORTED_FUNCTION const char * pm_version(void);
+
+/**
+ * @private
+ *
+ * This is used to decide of the prism parser should be used.
+ *
+ * @retval true Use Prism to parse files
+ * @retval false Use standard parser
+ */
+bool *rb_ruby_prism_ptr(void);
+
/**
* Initialize a parser with the given start and end pointers.
*