debase-ruby_core_source 3.3.1 → 3.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. checksums.yaml +4 -4
  2. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/addr2line.h +22 -0
  3. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/builtin.h +117 -0
  4. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/build_assert/build_assert.h +40 -0
  5. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/check_type/check_type.h +63 -0
  6. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/container_of/container_of.h +142 -0
  7. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/list/list.h +791 -0
  8. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/str/str.h +17 -0
  9. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/constant.h +53 -0
  10. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/darray.h +246 -0
  11. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/debug_counter.h +423 -0
  12. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/dln.h +32 -0
  13. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/encindex.h +70 -0
  14. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/eval_intern.h +343 -0
  15. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/hrtime.h +227 -0
  16. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/id.h +343 -0
  17. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/id_table.h +39 -0
  18. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/insns.inc +251 -0
  19. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/insns_info.inc +9215 -0
  20. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/array.h +151 -0
  21. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/basic_operators.h +63 -0
  22. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/bignum.h +244 -0
  23. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/bits.h +568 -0
  24. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/class.h +277 -0
  25. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/cmdlineopt.h +65 -0
  26. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compar.h +29 -0
  27. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compile.h +34 -0
  28. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compilers.h +107 -0
  29. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/complex.h +29 -0
  30. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/cont.h +35 -0
  31. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/dir.h +16 -0
  32. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enc.h +19 -0
  33. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/encoding.h +35 -0
  34. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enum.h +18 -0
  35. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enumerator.h +21 -0
  36. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/error.h +216 -0
  37. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/eval.h +33 -0
  38. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/file.h +38 -0
  39. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/fixnum.h +184 -0
  40. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/gc.h +364 -0
  41. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/hash.h +191 -0
  42. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/imemo.h +240 -0
  43. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/inits.h +50 -0
  44. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/io.h +137 -0
  45. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/load.h +18 -0
  46. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/loadpath.h +16 -0
  47. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/math.h +23 -0
  48. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/missing.h +18 -0
  49. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/numeric.h +273 -0
  50. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/object.h +62 -0
  51. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/parse.h +108 -0
  52. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/proc.h +30 -0
  53. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/process.h +124 -0
  54. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/ractor.h +6 -0
  55. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/random.h +17 -0
  56. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/range.h +40 -0
  57. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/rational.h +71 -0
  58. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/re.h +28 -0
  59. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/ruby_parser.h +69 -0
  60. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/sanitizers.h +186 -0
  61. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/serial.h +23 -0
  62. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/signal.h +25 -0
  63. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/static_assert.h +16 -0
  64. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/string.h +160 -0
  65. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/struct.h +127 -0
  66. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/symbol.h +45 -0
  67. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/thread.h +78 -0
  68. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/time.h +34 -0
  69. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/transcode.h +23 -0
  70. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/util.h +27 -0
  71. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/variable.h +72 -0
  72. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/vm.h +136 -0
  73. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/warnings.h +16 -0
  74. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal.h +112 -0
  75. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/iseq.h +338 -0
  76. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/known_errors.inc +791 -0
  77. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/method.h +254 -0
  78. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/node.h +128 -0
  79. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/node_name.inc +212 -0
  80. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/optinsn.inc +128 -0
  81. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/optunifs.inc +43 -0
  82. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parse.h +243 -0
  83. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_bits.h +564 -0
  84. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_node.h +32 -0
  85. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_st.h +162 -0
  86. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_value.h +106 -0
  87. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/ast.h +4612 -0
  88. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/defines.h +94 -0
  89. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/diagnostic.h +297 -0
  90. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/encoding.h +248 -0
  91. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/extension.h +18 -0
  92. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/node.h +57 -0
  93. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/options.h +204 -0
  94. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/pack.h +152 -0
  95. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/parser.h +716 -0
  96. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/prettyprint.h +26 -0
  97. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/prism.h +272 -0
  98. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/regexp.h +33 -0
  99. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_buffer.h +146 -0
  100. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_char.h +205 -0
  101. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_constant_pool.h +191 -0
  102. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_list.h +97 -0
  103. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_memchr.h +29 -0
  104. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_newline_list.h +104 -0
  105. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_state_stack.h +42 -0
  106. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_string.h +150 -0
  107. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_string_list.h +44 -0
  108. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strncasecmp.h +32 -0
  109. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strpbrk.h +43 -0
  110. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/version.h +29 -0
  111. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism_compile.h +29 -0
  112. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/probes_helper.h +42 -0
  113. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ractor_core.h +393 -0
  114. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regenc.h +254 -0
  115. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regint.h +1006 -0
  116. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regparse.h +371 -0
  117. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/revision.h +5 -0
  118. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rjit.h +101 -0
  119. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rjit_c.h +164 -0
  120. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ruby_assert.h +14 -0
  121. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ruby_atomic.h +23 -0
  122. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rubyparser.h +1405 -0
  123. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/shape.h +233 -0
  124. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/siphash.h +48 -0
  125. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/symbol.h +118 -0
  126. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_none.h +21 -0
  127. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_pthread.h +166 -0
  128. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_win32.h +58 -0
  129. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/timev.h +58 -0
  130. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/transcode_data.h +138 -0
  131. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/variable.h +39 -0
  132. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/version.h +69 -0
  133. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm.inc +5436 -0
  134. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_call_iseq_optimized.inc +244 -0
  135. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_callinfo.h +614 -0
  136. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_core.h +2202 -0
  137. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_debug.h +122 -0
  138. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_exec.h +199 -0
  139. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_insnhelper.h +261 -0
  140. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_opts.h +67 -0
  141. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_sync.h +137 -0
  142. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vmtc.inc +245 -0
  143. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/yjit.h +72 -0
  144. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/addr2line.h +22 -0
  145. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/builtin.h +119 -0
  146. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/build_assert/build_assert.h +40 -0
  147. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/check_type/check_type.h +63 -0
  148. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/container_of/container_of.h +142 -0
  149. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/list/list.h +791 -0
  150. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/str/str.h +17 -0
  151. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/constant.h +53 -0
  152. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/darray.h +191 -0
  153. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/debug_counter.h +423 -0
  154. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/dln.h +34 -0
  155. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/encindex.h +70 -0
  156. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/eval_intern.h +324 -0
  157. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/hrtime.h +237 -0
  158. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id.h +343 -0
  159. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id_table.h +39 -0
  160. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns.inc +259 -0
  161. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns_info.inc +9530 -0
  162. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/array.h +151 -0
  163. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/basic_operators.h +63 -0
  164. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bignum.h +244 -0
  165. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bits.h +568 -0
  166. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/class.h +283 -0
  167. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/cmdlineopt.h +65 -0
  168. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compar.h +29 -0
  169. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compile.h +34 -0
  170. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compilers.h +107 -0
  171. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/complex.h +29 -0
  172. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/cont.h +35 -0
  173. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/dir.h +16 -0
  174. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enc.h +19 -0
  175. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/encoding.h +36 -0
  176. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enum.h +18 -0
  177. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enumerator.h +21 -0
  178. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/error.h +216 -0
  179. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/eval.h +33 -0
  180. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/file.h +38 -0
  181. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/fixnum.h +184 -0
  182. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/gc.h +334 -0
  183. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/hash.h +191 -0
  184. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/imemo.h +260 -0
  185. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/inits.h +47 -0
  186. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/io.h +140 -0
  187. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/load.h +18 -0
  188. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/loadpath.h +16 -0
  189. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/math.h +23 -0
  190. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/missing.h +19 -0
  191. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/numeric.h +274 -0
  192. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/object.h +63 -0
  193. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/parse.h +117 -0
  194. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/proc.h +30 -0
  195. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/process.h +124 -0
  196. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ractor.h +6 -0
  197. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/random.h +17 -0
  198. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/range.h +40 -0
  199. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/rational.h +71 -0
  200. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/re.h +28 -0
  201. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ruby_parser.h +102 -0
  202. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/sanitizers.h +297 -0
  203. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/serial.h +23 -0
  204. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/signal.h +24 -0
  205. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/st.h +11 -0
  206. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/static_assert.h +16 -0
  207. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/string.h +182 -0
  208. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/struct.h +127 -0
  209. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/symbol.h +45 -0
  210. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/thread.h +79 -0
  211. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/time.h +34 -0
  212. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/transcode.h +23 -0
  213. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/util.h +27 -0
  214. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/variable.h +72 -0
  215. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/vm.h +137 -0
  216. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/warnings.h +16 -0
  217. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal.h +108 -0
  218. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/iseq.h +340 -0
  219. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/known_errors.inc +1419 -0
  220. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/method.h +255 -0
  221. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/node.h +111 -0
  222. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/node_name.inc +224 -0
  223. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optinsn.inc +128 -0
  224. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optunifs.inc +43 -0
  225. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parse.h +243 -0
  226. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_bits.h +564 -0
  227. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_node.h +32 -0
  228. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_st.h +162 -0
  229. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_value.h +106 -0
  230. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/ast.h +6245 -0
  231. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/defines.h +206 -0
  232. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/diagnostic.h +433 -0
  233. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/encoding.h +283 -0
  234. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/extension.h +19 -0
  235. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/node.h +150 -0
  236. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/options.h +305 -0
  237. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/pack.h +163 -0
  238. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/parser.h +891 -0
  239. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/prettyprint.h +34 -0
  240. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/prism.h +347 -0
  241. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/regexp.h +33 -0
  242. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/static_literals.h +120 -0
  243. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_buffer.h +218 -0
  244. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_char.h +205 -0
  245. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_constant_pool.h +226 -0
  246. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_integer.h +119 -0
  247. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_list.h +97 -0
  248. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_memchr.h +29 -0
  249. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_newline_list.h +102 -0
  250. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string.h +174 -0
  251. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string_list.h +44 -0
  252. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strncasecmp.h +32 -0
  253. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strpbrk.h +46 -0
  254. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/version.h +29 -0
  255. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism_compile.h +88 -0
  256. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/probes_helper.h +42 -0
  257. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ractor_core.h +393 -0
  258. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regenc.h +254 -0
  259. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regint.h +1010 -0
  260. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regparse.h +371 -0
  261. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/revision.h +5 -0
  262. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rjit.h +101 -0
  263. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rjit_c.h +165 -0
  264. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ruby_assert.h +14 -0
  265. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ruby_atomic.h +23 -0
  266. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rubyparser.h +1430 -0
  267. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/shape.h +233 -0
  268. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/siphash.h +48 -0
  269. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/symbol.h +118 -0
  270. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_none.h +21 -0
  271. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_pthread.h +166 -0
  272. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_win32.h +58 -0
  273. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/timev.h +58 -0
  274. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/transcode_data.h +138 -0
  275. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/variable.h +39 -0
  276. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/version.h +69 -0
  277. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm.inc +5643 -0
  278. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_call_iseq_optimized.inc +244 -0
  279. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_callinfo.h +605 -0
  280. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_core.h +2236 -0
  281. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_debug.h +124 -0
  282. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_exec.h +199 -0
  283. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_insnhelper.h +272 -0
  284. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_opts.h +67 -0
  285. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_sync.h +137 -0
  286. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vmtc.inc +253 -0
  287. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/yjit.h +79 -0
  288. data/lib/debase/ruby_core_source/version.rb +1 -1
  289. metadata +289 -3
@@ -0,0 +1,283 @@
1
+ /**
2
+ * @file encoding.h
3
+ *
4
+ * The encoding interface and implementations used by the parser.
5
+ */
6
+ #ifndef PRISM_ENCODING_H
7
+ #define PRISM_ENCODING_H
8
+
9
+ #include "prism/defines.h"
10
+ #include "prism/util/pm_strncasecmp.h"
11
+
12
+ #include <assert.h>
13
+ #include <stdbool.h>
14
+ #include <stddef.h>
15
+ #include <stdint.h>
16
+
17
+ /**
18
+ * This struct defines the functions necessary to implement the encoding
19
+ * interface so we can determine how many bytes the subsequent character takes.
20
+ * Each callback should return the number of bytes, or 0 if the next bytes are
21
+ * invalid for the encoding and type.
22
+ */
23
+ typedef struct {
24
+ /**
25
+ * Return the number of bytes that the next character takes if it is valid
26
+ * in the encoding. Does not read more than n bytes. It is assumed that n is
27
+ * at least 1.
28
+ */
29
+ size_t (*char_width)(const uint8_t *b, ptrdiff_t n);
30
+
31
+ /**
32
+ * Return the number of bytes that the next character takes if it is valid
33
+ * in the encoding and is alphabetical. Does not read more than n bytes. It
34
+ * is assumed that n is at least 1.
35
+ */
36
+ size_t (*alpha_char)(const uint8_t *b, ptrdiff_t n);
37
+
38
+ /**
39
+ * Return the number of bytes that the next character takes if it is valid
40
+ * in the encoding and is alphanumeric. Does not read more than n bytes. It
41
+ * is assumed that n is at least 1.
42
+ */
43
+ size_t (*alnum_char)(const uint8_t *b, ptrdiff_t n);
44
+
45
+ /**
46
+ * Return true if the next character is valid in the encoding and is an
47
+ * uppercase character. Does not read more than n bytes. It is assumed that
48
+ * n is at least 1.
49
+ */
50
+ bool (*isupper_char)(const uint8_t *b, ptrdiff_t n);
51
+
52
+ /**
53
+ * The name of the encoding. This should correspond to a value that can be
54
+ * passed to Encoding.find in Ruby.
55
+ */
56
+ const char *name;
57
+
58
+ /**
59
+ * Return true if the encoding is a multibyte encoding.
60
+ */
61
+ bool multibyte;
62
+ } pm_encoding_t;
63
+
64
+ /**
65
+ * All of the lookup tables use the first bit of each embedded byte to indicate
66
+ * whether the codepoint is alphabetical.
67
+ */
68
+ #define PRISM_ENCODING_ALPHABETIC_BIT 1 << 0
69
+
70
+ /**
71
+ * All of the lookup tables use the second bit of each embedded byte to indicate
72
+ * whether the codepoint is alphanumeric.
73
+ */
74
+ #define PRISM_ENCODING_ALPHANUMERIC_BIT 1 << 1
75
+
76
+ /**
77
+ * All of the lookup tables use the third bit of each embedded byte to indicate
78
+ * whether the codepoint is uppercase.
79
+ */
80
+ #define PRISM_ENCODING_UPPERCASE_BIT 1 << 2
81
+
82
+ /**
83
+ * Return the size of the next character in the UTF-8 encoding.
84
+ *
85
+ * @param b The bytes to read.
86
+ * @param n The number of bytes that can be read.
87
+ * @returns The number of bytes that the next character takes if it is valid in
88
+ * the encoding, or 0 if it is not.
89
+ */
90
+ size_t pm_encoding_utf_8_char_width(const uint8_t *b, ptrdiff_t n);
91
+
92
+ /**
93
+ * Return the size of the next character in the UTF-8 encoding if it is an
94
+ * alphabetical character.
95
+ *
96
+ * @param b The bytes to read.
97
+ * @param n The number of bytes that can be read.
98
+ * @returns The number of bytes that the next character takes if it is valid in
99
+ * the encoding, or 0 if it is not.
100
+ */
101
+ size_t pm_encoding_utf_8_alpha_char(const uint8_t *b, ptrdiff_t n);
102
+
103
+ /**
104
+ * Return the size of the next character in the UTF-8 encoding if it is an
105
+ * alphanumeric character.
106
+ *
107
+ * @param b The bytes to read.
108
+ * @param n The number of bytes that can be read.
109
+ * @returns The number of bytes that the next character takes if it is valid in
110
+ * the encoding, or 0 if it is not.
111
+ */
112
+ size_t pm_encoding_utf_8_alnum_char(const uint8_t *b, ptrdiff_t n);
113
+
114
+ /**
115
+ * Return true if the next character in the UTF-8 encoding if it is an uppercase
116
+ * character.
117
+ *
118
+ * @param b The bytes to read.
119
+ * @param n The number of bytes that can be read.
120
+ * @returns True if the next character is valid in the encoding and is an
121
+ * uppercase character, or false if it is not.
122
+ */
123
+ bool pm_encoding_utf_8_isupper_char(const uint8_t *b, ptrdiff_t n);
124
+
125
+ /**
126
+ * This lookup table is referenced in both the UTF-8 encoding file and the
127
+ * parser directly in order to speed up the default encoding processing. It is
128
+ * used to indicate whether a character is alphabetical, alphanumeric, or
129
+ * uppercase in unicode mappings.
130
+ */
131
+ extern const uint8_t pm_encoding_unicode_table[256];
132
+
133
+ /**
134
+ * These are all of the encodings that prism supports.
135
+ */
136
+ typedef enum {
137
+ PM_ENCODING_UTF_8 = 0,
138
+ PM_ENCODING_US_ASCII,
139
+ PM_ENCODING_ASCII_8BIT,
140
+ PM_ENCODING_EUC_JP,
141
+ PM_ENCODING_WINDOWS_31J,
142
+
143
+ // We optionally support excluding the full set of encodings to only support the
144
+ // minimum necessary to process Ruby code without encoding comments.
145
+ #ifndef PRISM_ENCODING_EXCLUDE_FULL
146
+ PM_ENCODING_BIG5,
147
+ PM_ENCODING_BIG5_HKSCS,
148
+ PM_ENCODING_BIG5_UAO,
149
+ PM_ENCODING_CESU_8,
150
+ PM_ENCODING_CP51932,
151
+ PM_ENCODING_CP850,
152
+ PM_ENCODING_CP852,
153
+ PM_ENCODING_CP855,
154
+ PM_ENCODING_CP949,
155
+ PM_ENCODING_CP950,
156
+ PM_ENCODING_CP951,
157
+ PM_ENCODING_EMACS_MULE,
158
+ PM_ENCODING_EUC_JP_MS,
159
+ PM_ENCODING_EUC_JIS_2004,
160
+ PM_ENCODING_EUC_KR,
161
+ PM_ENCODING_EUC_TW,
162
+ PM_ENCODING_GB12345,
163
+ PM_ENCODING_GB18030,
164
+ PM_ENCODING_GB1988,
165
+ PM_ENCODING_GB2312,
166
+ PM_ENCODING_GBK,
167
+ PM_ENCODING_IBM437,
168
+ PM_ENCODING_IBM720,
169
+ PM_ENCODING_IBM737,
170
+ PM_ENCODING_IBM775,
171
+ PM_ENCODING_IBM852,
172
+ PM_ENCODING_IBM855,
173
+ PM_ENCODING_IBM857,
174
+ PM_ENCODING_IBM860,
175
+ PM_ENCODING_IBM861,
176
+ PM_ENCODING_IBM862,
177
+ PM_ENCODING_IBM863,
178
+ PM_ENCODING_IBM864,
179
+ PM_ENCODING_IBM865,
180
+ PM_ENCODING_IBM866,
181
+ PM_ENCODING_IBM869,
182
+ PM_ENCODING_ISO_8859_1,
183
+ PM_ENCODING_ISO_8859_2,
184
+ PM_ENCODING_ISO_8859_3,
185
+ PM_ENCODING_ISO_8859_4,
186
+ PM_ENCODING_ISO_8859_5,
187
+ PM_ENCODING_ISO_8859_6,
188
+ PM_ENCODING_ISO_8859_7,
189
+ PM_ENCODING_ISO_8859_8,
190
+ PM_ENCODING_ISO_8859_9,
191
+ PM_ENCODING_ISO_8859_10,
192
+ PM_ENCODING_ISO_8859_11,
193
+ PM_ENCODING_ISO_8859_13,
194
+ PM_ENCODING_ISO_8859_14,
195
+ PM_ENCODING_ISO_8859_15,
196
+ PM_ENCODING_ISO_8859_16,
197
+ PM_ENCODING_KOI8_R,
198
+ PM_ENCODING_KOI8_U,
199
+ PM_ENCODING_MAC_CENT_EURO,
200
+ PM_ENCODING_MAC_CROATIAN,
201
+ PM_ENCODING_MAC_CYRILLIC,
202
+ PM_ENCODING_MAC_GREEK,
203
+ PM_ENCODING_MAC_ICELAND,
204
+ PM_ENCODING_MAC_JAPANESE,
205
+ PM_ENCODING_MAC_ROMAN,
206
+ PM_ENCODING_MAC_ROMANIA,
207
+ PM_ENCODING_MAC_THAI,
208
+ PM_ENCODING_MAC_TURKISH,
209
+ PM_ENCODING_MAC_UKRAINE,
210
+ PM_ENCODING_SHIFT_JIS,
211
+ PM_ENCODING_SJIS_DOCOMO,
212
+ PM_ENCODING_SJIS_KDDI,
213
+ PM_ENCODING_SJIS_SOFTBANK,
214
+ PM_ENCODING_STATELESS_ISO_2022_JP,
215
+ PM_ENCODING_STATELESS_ISO_2022_JP_KDDI,
216
+ PM_ENCODING_TIS_620,
217
+ PM_ENCODING_UTF8_MAC,
218
+ PM_ENCODING_UTF8_DOCOMO,
219
+ PM_ENCODING_UTF8_KDDI,
220
+ PM_ENCODING_UTF8_SOFTBANK,
221
+ PM_ENCODING_WINDOWS_1250,
222
+ PM_ENCODING_WINDOWS_1251,
223
+ PM_ENCODING_WINDOWS_1252,
224
+ PM_ENCODING_WINDOWS_1253,
225
+ PM_ENCODING_WINDOWS_1254,
226
+ PM_ENCODING_WINDOWS_1255,
227
+ PM_ENCODING_WINDOWS_1256,
228
+ PM_ENCODING_WINDOWS_1257,
229
+ PM_ENCODING_WINDOWS_1258,
230
+ PM_ENCODING_WINDOWS_874,
231
+ #endif
232
+
233
+ PM_ENCODING_MAXIMUM
234
+ } pm_encoding_type_t;
235
+
236
+ /**
237
+ * This is the table of all of the encodings that prism supports.
238
+ */
239
+ extern const pm_encoding_t pm_encodings[PM_ENCODING_MAXIMUM];
240
+
241
+ /**
242
+ * This is the default UTF-8 encoding. We need a reference to it to quickly
243
+ * create parsers.
244
+ */
245
+ #define PM_ENCODING_UTF_8_ENTRY (&pm_encodings[PM_ENCODING_UTF_8])
246
+
247
+ /**
248
+ * This is the US-ASCII encoding. We need a reference to it to be able to
249
+ * compare against it when a string is being created because it could possibly
250
+ * need to fall back to ASCII-8BIT.
251
+ */
252
+ #define PM_ENCODING_US_ASCII_ENTRY (&pm_encodings[PM_ENCODING_US_ASCII])
253
+
254
+ /**
255
+ * This is the ASCII-8BIT encoding. We need a reference to it so that pm_strpbrk
256
+ * can compare against it because invalid multibyte characters are not a thing
257
+ * in this encoding. It is also needed for handling Regexp encoding flags.
258
+ */
259
+ #define PM_ENCODING_ASCII_8BIT_ENTRY (&pm_encodings[PM_ENCODING_ASCII_8BIT])
260
+
261
+ /**
262
+ * This is the EUC-JP encoding. We need a reference to it to quickly process
263
+ * regular expression modifiers.
264
+ */
265
+ #define PM_ENCODING_EUC_JP_ENTRY (&pm_encodings[PM_ENCODING_EUC_JP])
266
+
267
+ /**
268
+ * This is the Windows-31J encoding. We need a reference to it to quickly
269
+ * process regular expression modifiers.
270
+ */
271
+ #define PM_ENCODING_WINDOWS_31J_ENTRY (&pm_encodings[PM_ENCODING_WINDOWS_31J])
272
+
273
+ /**
274
+ * Parse the given name of an encoding and return a pointer to the corresponding
275
+ * encoding struct if one can be found, otherwise return NULL.
276
+ *
277
+ * @param start A pointer to the first byte of the name.
278
+ * @param end A pointer to the last byte of the name.
279
+ * @returns A pointer to the encoding struct if one is found, otherwise NULL.
280
+ */
281
+ const pm_encoding_t * pm_encoding_find(const uint8_t *start, const uint8_t *end);
282
+
283
+ #endif
@@ -0,0 +1,19 @@
1
+ #ifndef PRISM_EXT_NODE_H
2
+ #define PRISM_EXT_NODE_H
3
+
4
+ #define EXPECTED_PRISM_VERSION "0.29.0"
5
+
6
+ #include <ruby.h>
7
+ #include <ruby/encoding.h>
8
+ #include "prism.h"
9
+
10
+ VALUE pm_source_new(const pm_parser_t *parser, rb_encoding *encoding);
11
+ VALUE pm_token_new(const pm_parser_t *parser, const pm_token_t *token, rb_encoding *encoding, VALUE source);
12
+ VALUE pm_ast_new(const pm_parser_t *parser, const pm_node_t *node, rb_encoding *encoding, VALUE source);
13
+ VALUE pm_integer_new(const pm_integer_t *integer);
14
+
15
+ void Init_prism_api_node(void);
16
+ void Init_prism_pack(void);
17
+ PRISM_EXPORTED_FUNCTION void Init_prism(void);
18
+
19
+ #endif
@@ -0,0 +1,150 @@
1
+ /**
2
+ * @file node.h
3
+ *
4
+ * Functions related to nodes in the AST.
5
+ */
6
+ #ifndef PRISM_NODE_H
7
+ #define PRISM_NODE_H
8
+
9
+ #include "prism/defines.h"
10
+ #include "prism/parser.h"
11
+ #include "prism/util/pm_buffer.h"
12
+
13
+ /**
14
+ * Loop through each node in the node list, writing each node to the given
15
+ * pm_node_t pointer.
16
+ */
17
+ #define PM_NODE_LIST_FOREACH(list, index, node) \
18
+ for (size_t index = 0; index < (list)->size && ((node) = (list)->nodes[index]); index++)
19
+
20
+ /**
21
+ * Append a new node onto the end of the node list.
22
+ *
23
+ * @param list The list to append to.
24
+ * @param node The node to append.
25
+ */
26
+ void pm_node_list_append(pm_node_list_t *list, pm_node_t *node);
27
+
28
+ /**
29
+ * Prepend a new node onto the beginning of the node list.
30
+ *
31
+ * @param list The list to prepend to.
32
+ * @param node The node to prepend.
33
+ */
34
+ void pm_node_list_prepend(pm_node_list_t *list, pm_node_t *node);
35
+
36
+ /**
37
+ * Concatenate the given node list onto the end of the other node list.
38
+ *
39
+ * @param list The list to concatenate onto.
40
+ * @param other The list to concatenate.
41
+ */
42
+ void pm_node_list_concat(pm_node_list_t *list, pm_node_list_t *other);
43
+
44
+ /**
45
+ * Free the internal memory associated with the given node list.
46
+ *
47
+ * @param list The list to free.
48
+ */
49
+ void pm_node_list_free(pm_node_list_t *list);
50
+
51
+ /**
52
+ * Deallocate a node and all of its children.
53
+ *
54
+ * @param parser The parser that owns the node.
55
+ * @param node The node to deallocate.
56
+ */
57
+ PRISM_EXPORTED_FUNCTION void pm_node_destroy(pm_parser_t *parser, struct pm_node *node);
58
+
59
+ /**
60
+ * This struct stores the information gathered by the pm_node_memsize function.
61
+ * It contains both the memory footprint and additionally metadata about the
62
+ * shape of the tree.
63
+ */
64
+ typedef struct {
65
+ /** The total memory footprint of the node and all of its children. */
66
+ size_t memsize;
67
+
68
+ /** The number of children the node has. */
69
+ size_t node_count;
70
+ } pm_memsize_t;
71
+
72
+ /**
73
+ * Calculates the memory footprint of a given node.
74
+ *
75
+ * @param node The node to calculate the memory footprint of.
76
+ * @param memsize The memory footprint of the node and all of its children.
77
+ */
78
+ PRISM_EXPORTED_FUNCTION void pm_node_memsize(pm_node_t *node, pm_memsize_t *memsize);
79
+
80
+ /**
81
+ * Returns a string representation of the given node type.
82
+ *
83
+ * @param node_type The node type to convert to a string.
84
+ * @return A string representation of the given node type.
85
+ */
86
+ PRISM_EXPORTED_FUNCTION const char * pm_node_type_to_str(pm_node_type_t node_type);
87
+
88
+ /**
89
+ * Visit each of the nodes in this subtree using the given visitor callback. The
90
+ * callback function will be called for each node in the subtree. If it returns
91
+ * false, then that node's children will not be visited. If it returns true,
92
+ * then the children will be visited. The data parameter is treated as an opaque
93
+ * pointer and is passed to the visitor callback for consumers to use as they
94
+ * see fit.
95
+ *
96
+ * As an example:
97
+ *
98
+ * ```c
99
+ * #include "prism.h"
100
+ *
101
+ * bool visit(const pm_node_t *node, void *data) {
102
+ * size_t *indent = (size_t *) data;
103
+ * for (size_t i = 0; i < *indent * 2; i++) putc(' ', stdout);
104
+ * printf("%s\n", pm_node_type_to_str(node->type));
105
+ *
106
+ * size_t next_indent = *indent + 1;
107
+ * size_t *next_data = &next_indent;
108
+ * pm_visit_child_nodes(node, visit, next_data);
109
+ *
110
+ * return false;
111
+ * }
112
+ *
113
+ * int main(void) {
114
+ * const char *source = "1 + 2; 3 + 4";
115
+ * size_t size = strlen(source);
116
+ *
117
+ * pm_parser_t parser;
118
+ * pm_options_t options = { 0 };
119
+ * pm_parser_init(&parser, (const uint8_t *) source, size, &options);
120
+ *
121
+ * size_t indent = 0;
122
+ * pm_node_t *node = pm_parse(&parser);
123
+ *
124
+ * size_t *data = &indent;
125
+ * pm_visit_node(node, visit, data);
126
+ *
127
+ * pm_node_destroy(&parser, node);
128
+ * pm_parser_free(&parser);
129
+ * return EXIT_SUCCESS;
130
+ * }
131
+ * ```
132
+ *
133
+ * @param node The root node to start visiting from.
134
+ * @param visitor The callback to call for each node in the subtree.
135
+ * @param data An opaque pointer that is passed to the visitor callback.
136
+ */
137
+ PRISM_EXPORTED_FUNCTION void pm_visit_node(const pm_node_t *node, bool (*visitor)(const pm_node_t *node, void *data), void *data);
138
+
139
+ /**
140
+ * Visit the children of the given node with the given callback. This is the
141
+ * default behavior for walking the tree that is called from pm_visit_node if
142
+ * the callback returns true.
143
+ *
144
+ * @param node The node to visit the children of.
145
+ * @param visitor The callback to call for each child node.
146
+ * @param data An opaque pointer that is passed to the visitor callback.
147
+ */
148
+ PRISM_EXPORTED_FUNCTION void pm_visit_child_nodes(const pm_node_t *node, bool (*visitor)(const pm_node_t *node, void *data), void *data);
149
+
150
+ #endif