@appthreat/atom-parsetools 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/README.md +111 -14
  2. package/package.json +2 -1
  3. package/plugins/composer/installed.php +6 -6
  4. package/plugins/rubyastgen/Gemfile +6 -4
  5. package/plugins/rubyastgen/Gemfile.lock +5 -8
  6. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-4ac84327b3af/Gemfile +11 -0
  7. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-4ac84327b3af/exe/ruby_ast_gen +55 -0
  8. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-4ac84327b3af/lib/ruby_ast_gen/cli.rb +133 -0
  9. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-4ac84327b3af/lib/ruby_ast_gen/node_handling.rb +449 -0
  10. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/{ruby_ast_gen-cc312ebf06b4 → ruby_ast_gen-4ac84327b3af}/lib/ruby_ast_gen/version.rb +1 -1
  11. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-4ac84327b3af/lib/ruby_ast_gen.rb +888 -0
  12. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-4ac84327b3af/ruby_ast_gen.gemspec +25 -0
  13. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current.rb +1 -1
  14. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/version.rb +1 -1
  15. package/plugins/rubyastgen/bundle/ruby/4.0.0/specifications/ast-2.4.3.gemspec +29 -0
  16. package/plugins/rubyastgen/bundle/ruby/4.0.0/specifications/bundler-2.6.9.gemspec +25 -0
  17. package/plugins/rubyastgen/bundle/ruby/4.0.0/specifications/ostruct-0.6.3.gemspec +22 -0
  18. package/plugins/rubyastgen/bundle/ruby/4.0.0/specifications/parser-3.3.12.0.gemspec +37 -0
  19. package/rbastgen.js +102 -13
  20. package/scalasem.js +11 -2
  21. package/plugins/bin/bundler +0 -14
  22. package/plugins/bin/ruby_ast_gen +0 -14
  23. package/plugins/rubyastgen/bundle/bundler/setup.rb +0 -44
  24. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-cc312ebf06b4/exe/ruby_ast_gen +0 -63
  25. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-cc312ebf06b4/lib/ruby_ast_gen/node_handling.rb +0 -269
  26. package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/ruby_ast_gen-cc312ebf06b4/lib/ruby_ast_gen.rb +0 -218
  27. package/plugins/rubyastgen/bundle/ruby/4.0.0/extensions/x86_64-linux/4.0.0/prism-1.9.0/gem.build_complete +0 -0
  28. package/plugins/rubyastgen/bundle/ruby/4.0.0/extensions/x86_64-linux/4.0.0/prism-1.9.0/gem_make.out +0 -44
  29. package/plugins/rubyastgen/bundle/ruby/4.0.0/extensions/x86_64-linux/4.0.0/prism-1.9.0/mkmf.log +0 -74
  30. package/plugins/rubyastgen/bundle/ruby/4.0.0/extensions/x86_64-linux/4.0.0/prism-1.9.0/prism/prism.so +0 -0
  31. package/plugins/rubyastgen/bundle/ruby/4.0.0/extensions/x86_64-linux/4.0.0/racc-1.8.1/gem.build_complete +0 -0
  32. package/plugins/rubyastgen/bundle/ruby/4.0.0/extensions/x86_64-linux/4.0.0/racc-1.8.1/gem_make.out +0 -18
  33. package/plugins/rubyastgen/bundle/ruby/4.0.0/extensions/x86_64-linux/4.0.0/racc-1.8.1/racc/cparse.so +0 -0
  34. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/BSDmakefile +0 -58
  35. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/Makefile +0 -116
  36. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/ext/prism/Makefile +0 -273
  37. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/ext/prism/api_node.c +0 -6945
  38. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/ext/prism/api_pack.c +0 -276
  39. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/ext/prism/extconf.rb +0 -127
  40. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/ext/prism/extension.c +0 -1427
  41. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/ext/prism/extension.h +0 -19
  42. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/ast.h +0 -8254
  43. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/defines.h +0 -260
  44. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/diagnostic.h +0 -458
  45. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/encoding.h +0 -283
  46. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/node.h +0 -129
  47. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/options.h +0 -488
  48. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/pack.h +0 -163
  49. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/parser.h +0 -936
  50. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/prettyprint.h +0 -34
  51. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/regexp.h +0 -43
  52. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/static_literals.h +0 -121
  53. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_buffer.h +0 -236
  54. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_char.h +0 -204
  55. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_constant_pool.h +0 -218
  56. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_integer.h +0 -130
  57. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_list.h +0 -103
  58. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_memchr.h +0 -29
  59. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_newline_list.h +0 -113
  60. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_string.h +0 -200
  61. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_strncasecmp.h +0 -32
  62. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/util/pm_strpbrk.h +0 -46
  63. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism/version.h +0 -29
  64. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/include/prism.h +0 -408
  65. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/compiler.rb +0 -801
  66. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/desugar_compiler.rb +0 -392
  67. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/dispatcher.rb +0 -2210
  68. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/dot_visitor.rb +0 -4767
  69. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/dsl.rb +0 -1003
  70. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/ffi.rb +0 -578
  71. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/inspect_visitor.rb +0 -2393
  72. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/lex_compat.rb +0 -911
  73. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/mutation_compiler.rb +0 -772
  74. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/node.rb +0 -19966
  75. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/node_ext.rb +0 -511
  76. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/pack.rb +0 -230
  77. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result/comments.rb +0 -188
  78. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result/errors.rb +0 -66
  79. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result/newlines.rb +0 -155
  80. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result.rb +0 -907
  81. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/pattern.rb +0 -269
  82. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/polyfill/append_as_bytes.rb +0 -15
  83. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/polyfill/byteindex.rb +0 -13
  84. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/polyfill/scan_byte.rb +0 -14
  85. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/polyfill/unpack1.rb +0 -14
  86. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/polyfill/warn.rb +0 -36
  87. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/prism.so +0 -0
  88. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/reflection.rb +0 -416
  89. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/relocation.rb +0 -505
  90. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/serialize.rb +0 -2400
  91. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/string_query.rb +0 -31
  92. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/parser/builder.rb +0 -62
  93. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/parser/compiler.rb +0 -2234
  94. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/parser/lexer.rb +0 -820
  95. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/parser.rb +0 -376
  96. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/parser_current.rb +0 -26
  97. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/parser_versions.rb +0 -36
  98. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/ripper/filter.rb +0 -53
  99. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/ripper/lexer.rb +0 -135
  100. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/ripper/sexp.rb +0 -126
  101. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/ripper/shim.rb +0 -5
  102. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/ripper.rb +0 -3520
  103. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation/ruby_parser.rb +0 -1964
  104. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/translation.rb +0 -18
  105. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/visitor.rb +0 -813
  106. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism.rb +0 -98
  107. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/compiler.rbi +0 -12
  108. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/dsl.rbi +0 -524
  109. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/inspect_visitor.rbi +0 -12
  110. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/node.rbi +0 -8750
  111. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/node_ext.rbi +0 -107
  112. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/parse_result.rbi +0 -404
  113. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/reflection.rbi +0 -58
  114. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/string_query.rbi +0 -12
  115. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/translation/parser.rbi +0 -11
  116. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/translation/parser_versions.rbi +0 -23
  117. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/translation/ripper.rbi +0 -15
  118. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism/visitor.rbi +0 -473
  119. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/rbi/prism.rbi +0 -63
  120. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/compiler.rbs +0 -9
  121. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/dispatcher.rbs +0 -19
  122. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/dot_visitor.rbs +0 -6
  123. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/dsl.rbs +0 -351
  124. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/inspect_visitor.rbs +0 -22
  125. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/lex_compat.rbs +0 -10
  126. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/mutation_compiler.rbs +0 -159
  127. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/node.rbs +0 -4042
  128. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/node_ext.rbs +0 -149
  129. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/pack.rbs +0 -43
  130. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/parse_result/comments.rbs +0 -38
  131. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/parse_result.rbs +0 -197
  132. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/pattern.rbs +0 -13
  133. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/reflection.rbs +0 -50
  134. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/relocation.rbs +0 -185
  135. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/serialize.rbs +0 -8
  136. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/string_query.rbs +0 -11
  137. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism/visitor.rbs +0 -169
  138. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/sig/prism.rbs +0 -272
  139. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/diagnostic.c +0 -854
  140. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/encoding.c +0 -5340
  141. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/node.c +0 -8685
  142. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/options.c +0 -338
  143. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/pack.c +0 -509
  144. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/prettyprint.c +0 -8957
  145. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/prism.c +0 -22679
  146. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/regexp.c +0 -790
  147. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/serialize.c +0 -2274
  148. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/static_literals.c +0 -617
  149. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/token_type.c +0 -703
  150. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_buffer.c +0 -357
  151. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_char.c +0 -318
  152. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_constant_pool.c +0 -342
  153. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_integer.c +0 -670
  154. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_list.c +0 -49
  155. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_memchr.c +0 -35
  156. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_newline_list.c +0 -125
  157. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_string.c +0 -381
  158. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_strncasecmp.c +0 -36
  159. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/prism-1.9.0/src/util/pm_strpbrk.c +0 -206
  160. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/BSDL +0 -22
  161. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/COPYING +0 -56
  162. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/ChangeLog +0 -846
  163. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/README.ja.rdoc +0 -58
  164. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/README.rdoc +0 -60
  165. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/TODO +0 -5
  166. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/bin/racc +0 -320
  167. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +0 -273
  168. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/ext/racc/cparse/cparse.c +0 -840
  169. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/ext/racc/cparse/extconf.rb +0 -8
  170. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/compat.rb +0 -33
  171. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
  172. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/debugflags.rb +0 -60
  173. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/exception.rb +0 -16
  174. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/grammar.rb +0 -1191
  175. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/grammarfileparser.rb +0 -667
  176. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/info.rb +0 -18
  177. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/iset.rb +0 -92
  178. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/logfilegenerator.rb +0 -212
  179. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/parser-text.rb +0 -644
  180. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/parser.rb +0 -630
  181. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/parserfilegenerator.rb +0 -473
  182. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/sourcetext.rb +0 -35
  183. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/state.rb +0 -976
  184. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/statetransitiontable.rb +0 -311
  185. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc/static.rb +0 -5
  186. package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/racc-1.8.1/lib/racc.rb +0 -6
  187. /package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/{ruby_ast_gen-cc312ebf06b4 → ruby_ast_gen-4ac84327b3af}/.rspec +0 -0
  188. /package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/{ruby_ast_gen-cc312ebf06b4 → ruby_ast_gen-4ac84327b3af}/bin/console +0 -0
  189. /package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/{ruby_ast_gen-cc312ebf06b4 → ruby_ast_gen-4ac84327b3af}/bin/setup +0 -0
  190. /package/plugins/rubyastgen/bundle/ruby/4.0.0/bundler/gems/{ruby_ast_gen-cc312ebf06b4 → ruby_ast_gen-4ac84327b3af}/update_version.rb +0 -0
  191. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-parse +0 -0
  192. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-rewrite +0 -0
  193. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/gauntlet_parser.rb +0 -0
  194. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/all.rb +0 -0
  195. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ast/node.rb +0 -0
  196. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ast/processor.rb +0 -0
  197. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/base.rb +0 -0
  198. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/builders/default.rb +0 -0
  199. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/clobbering_error.rb +0 -0
  200. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/color.rb +0 -0
  201. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/context.rb +0 -0
  202. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current_arg_stack.rb +0 -0
  203. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/deprecation.rb +0 -0
  204. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic/engine.rb +0 -0
  205. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic.rb +0 -0
  206. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/dedenter.rb +0 -0
  207. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/explanation.rb +0 -0
  208. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/literal.rb +0 -0
  209. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/stack_state.rb +0 -0
  210. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-F0.rb +0 -0
  211. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-F1.rb +0 -0
  212. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-strings.rb +0 -0
  213. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/macruby.rb +0 -0
  214. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/max_numparam_stack.rb +0 -0
  215. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/messages.rb +0 -0
  216. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/meta.rb +0 -0
  217. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rewriter.rb +0 -0
  218. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby18.rb +0 -0
  219. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby19.rb +0 -0
  220. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby20.rb +0 -0
  221. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby21.rb +0 -0
  222. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby22.rb +0 -0
  223. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby23.rb +0 -0
  224. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby24.rb +0 -0
  225. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby25.rb +0 -0
  226. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby26.rb +0 -0
  227. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby27.rb +0 -0
  228. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby30.rb +0 -0
  229. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby31.rb +0 -0
  230. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby32.rb +0 -0
  231. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby33.rb +0 -0
  232. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby34.rb +0 -0
  233. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rubymotion.rb +0 -0
  234. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner/ruby_parse.rb +0 -0
  235. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner/ruby_rewrite.rb +0 -0
  236. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner.rb +0 -0
  237. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/buffer.rb +0 -0
  238. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/comment/associator.rb +0 -0
  239. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/comment.rb +0 -0
  240. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/collection.rb +0 -0
  241. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/condition.rb +0 -0
  242. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/constant.rb +0 -0
  243. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/definition.rb +0 -0
  244. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/for.rb +0 -0
  245. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/heredoc.rb +0 -0
  246. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/index.rb +0 -0
  247. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/keyword.rb +0 -0
  248. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/method_definition.rb +0 -0
  249. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/objc_kwarg.rb +0 -0
  250. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/operator.rb +0 -0
  251. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/rescue_body.rb +0 -0
  252. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/send.rb +0 -0
  253. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/ternary.rb +0 -0
  254. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/variable.rb +0 -0
  255. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map.rb +0 -0
  256. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/range.rb +0 -0
  257. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/rewriter/action.rb +0 -0
  258. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/rewriter.rb +0 -0
  259. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/tree_rewriter/action.rb +0 -0
  260. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/tree_rewriter.rb +0 -0
  261. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/static_environment.rb +0 -0
  262. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/syntax_error.rb +0 -0
  263. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/tree_rewriter.rb +0 -0
  264. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/unknown_encoding_in_magic_comment_error.rb +0 -0
  265. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/variables_stack.rb +0 -0
  266. /package/plugins/rubyastgen/bundle/ruby/4.0.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser.rb +0 -0
@@ -1,34 +0,0 @@
1
- /**
2
- * @file prettyprint.h
3
- *
4
- * An AST node pretty-printer.
5
- */
6
- #ifndef PRISM_PRETTYPRINT_H
7
- #define PRISM_PRETTYPRINT_H
8
-
9
- #include "prism/defines.h"
10
-
11
- #ifdef PRISM_EXCLUDE_PRETTYPRINT
12
-
13
- void pm_prettyprint(void);
14
-
15
- #else
16
-
17
- #include <stdio.h>
18
-
19
- #include "prism/ast.h"
20
- #include "prism/parser.h"
21
- #include "prism/util/pm_buffer.h"
22
-
23
- /**
24
- * Pretty-prints the AST represented by the given node to the given buffer.
25
- *
26
- * @param output_buffer The buffer to write the pretty-printed AST to.
27
- * @param parser The parser that parsed the AST.
28
- * @param node The root node of the AST to pretty-print.
29
- */
30
- PRISM_EXPORTED_FUNCTION void pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node);
31
-
32
- #endif
33
-
34
- #endif
@@ -1,43 +0,0 @@
1
- /**
2
- * @file regexp.h
3
- *
4
- * A regular expression parser.
5
- */
6
- #ifndef PRISM_REGEXP_H
7
- #define PRISM_REGEXP_H
8
-
9
- #include "prism/defines.h"
10
- #include "prism/parser.h"
11
- #include "prism/encoding.h"
12
- #include "prism/util/pm_memchr.h"
13
- #include "prism/util/pm_string.h"
14
-
15
- #include <stdbool.h>
16
- #include <stddef.h>
17
- #include <string.h>
18
-
19
- /**
20
- * This callback is called by pm_regexp_parse() when a named capture group is found.
21
- */
22
- typedef void (*pm_regexp_name_callback_t)(const pm_string_t *name, void *data);
23
-
24
- /**
25
- * This callback is called by pm_regexp_parse() when a parse error is found.
26
- */
27
- typedef void (*pm_regexp_error_callback_t)(const uint8_t *start, const uint8_t *end, const char *message, void *data);
28
-
29
- /**
30
- * Parse a regular expression.
31
- *
32
- * @param parser The parser that is currently being used.
33
- * @param source The source code to parse.
34
- * @param size The size of the source code.
35
- * @param extended_mode Whether to parse the regular expression in extended mode.
36
- * @param name_callback The optional callback to call when a named capture group is found.
37
- * @param name_data The optional data to pass to the name callback.
38
- * @param error_callback The callback to call when a parse error is found.
39
- * @param error_data The data to pass to the error callback.
40
- */
41
- PRISM_EXPORTED_FUNCTION void pm_regexp_parse(pm_parser_t *parser, const uint8_t *source, size_t size, bool extended_mode, pm_regexp_name_callback_t name_callback, void *name_data, pm_regexp_error_callback_t error_callback, void *error_data);
42
-
43
- #endif
@@ -1,121 +0,0 @@
1
- /**
2
- * @file static_literals.h
3
- *
4
- * A set of static literal nodes that can be checked for duplicates.
5
- */
6
- #ifndef PRISM_STATIC_LITERALS_H
7
- #define PRISM_STATIC_LITERALS_H
8
-
9
- #include "prism/defines.h"
10
- #include "prism/ast.h"
11
- #include "prism/util/pm_newline_list.h"
12
-
13
- #include <assert.h>
14
- #include <stdbool.h>
15
-
16
- /**
17
- * An internal hash table for a set of nodes.
18
- */
19
- typedef struct {
20
- /** The array of nodes in the hash table. */
21
- pm_node_t **nodes;
22
-
23
- /** The size of the hash table. */
24
- uint32_t size;
25
-
26
- /** The space that has been allocated in the hash table. */
27
- uint32_t capacity;
28
- } pm_node_hash_t;
29
-
30
- /**
31
- * Certain sets of nodes (hash keys and when clauses) check for duplicate nodes
32
- * to alert the user of potential issues. To do this, we keep a set of the nodes
33
- * that have been seen so far, and compare whenever we find a new node.
34
- *
35
- * We bucket the nodes based on their type to minimize the number of comparisons
36
- * that need to be performed.
37
- */
38
- typedef struct {
39
- /**
40
- * This is the set of IntegerNode and SourceLineNode instances.
41
- */
42
- pm_node_hash_t integer_nodes;
43
-
44
- /**
45
- * This is the set of FloatNode instances.
46
- */
47
- pm_node_hash_t float_nodes;
48
-
49
- /**
50
- * This is the set of RationalNode and ImaginaryNode instances.
51
- */
52
- pm_node_hash_t number_nodes;
53
-
54
- /**
55
- * This is the set of StringNode and SourceFileNode instances.
56
- */
57
- pm_node_hash_t string_nodes;
58
-
59
- /**
60
- * This is the set of RegularExpressionNode instances.
61
- */
62
- pm_node_hash_t regexp_nodes;
63
-
64
- /**
65
- * This is the set of SymbolNode instances.
66
- */
67
- pm_node_hash_t symbol_nodes;
68
-
69
- /**
70
- * A pointer to the last TrueNode instance that was inserted, or NULL.
71
- */
72
- pm_node_t *true_node;
73
-
74
- /**
75
- * A pointer to the last FalseNode instance that was inserted, or NULL.
76
- */
77
- pm_node_t *false_node;
78
-
79
- /**
80
- * A pointer to the last NilNode instance that was inserted, or NULL.
81
- */
82
- pm_node_t *nil_node;
83
-
84
- /**
85
- * A pointer to the last SourceEncodingNode instance that was inserted, or
86
- * NULL.
87
- */
88
- pm_node_t *source_encoding_node;
89
- } pm_static_literals_t;
90
-
91
- /**
92
- * Add a node to the set of static literals.
93
- *
94
- * @param newline_list The list of newline offsets to use to calculate lines.
95
- * @param start_line The line number that the parser starts on.
96
- * @param literals The set of static literals to add the node to.
97
- * @param node The node to add to the set.
98
- * @param replace Whether to replace the previous node if one already exists.
99
- * @return A pointer to the node that is being overwritten, if there is one.
100
- */
101
- pm_node_t * pm_static_literals_add(const pm_newline_list_t *newline_list, int32_t start_line, pm_static_literals_t *literals, pm_node_t *node, bool replace);
102
-
103
- /**
104
- * Free the internal memory associated with the given static literals set.
105
- *
106
- * @param literals The set of static literals to free.
107
- */
108
- void pm_static_literals_free(pm_static_literals_t *literals);
109
-
110
- /**
111
- * Create a string-based representation of the given static literal.
112
- *
113
- * @param buffer The buffer to write the string to.
114
- * @param newline_list The list of newline offsets to use to calculate lines.
115
- * @param start_line The line number that the parser starts on.
116
- * @param encoding_name The name of the encoding of the source being parsed.
117
- * @param node The node to create a string representation of.
118
- */
119
- void pm_static_literal_inspect(pm_buffer_t *buffer, const pm_newline_list_t *newline_list, int32_t start_line, const char *encoding_name, const pm_node_t *node);
120
-
121
- #endif
@@ -1,236 +0,0 @@
1
- /**
2
- * @file pm_buffer.h
3
- *
4
- * A wrapper around a contiguous block of allocated memory.
5
- */
6
- #ifndef PRISM_BUFFER_H
7
- #define PRISM_BUFFER_H
8
-
9
- #include "prism/defines.h"
10
- #include "prism/util/pm_char.h"
11
-
12
- #include <assert.h>
13
- #include <stdbool.h>
14
- #include <stdint.h>
15
- #include <stdlib.h>
16
- #include <string.h>
17
-
18
- /**
19
- * A pm_buffer_t is a simple memory buffer that stores data in a contiguous
20
- * block of memory.
21
- */
22
- typedef struct {
23
- /** The length of the buffer in bytes. */
24
- size_t length;
25
-
26
- /** The capacity of the buffer in bytes that has been allocated. */
27
- size_t capacity;
28
-
29
- /** A pointer to the start of the buffer. */
30
- char *value;
31
- } pm_buffer_t;
32
-
33
- /**
34
- * Return the size of the pm_buffer_t struct.
35
- *
36
- * @returns The size of the pm_buffer_t struct.
37
- */
38
- PRISM_EXPORTED_FUNCTION size_t pm_buffer_sizeof(void);
39
-
40
- /**
41
- * Initialize a pm_buffer_t with the given capacity.
42
- *
43
- * @param buffer The buffer to initialize.
44
- * @param capacity The capacity of the buffer.
45
- * @returns True if the buffer was initialized successfully, false otherwise.
46
- */
47
- bool pm_buffer_init_capacity(pm_buffer_t *buffer, size_t capacity);
48
-
49
- /**
50
- * Initialize a pm_buffer_t with its default values.
51
- *
52
- * @param buffer The buffer to initialize.
53
- * @returns True if the buffer was initialized successfully, false otherwise.
54
- *
55
- * \public \memberof pm_buffer_t
56
- */
57
- PRISM_EXPORTED_FUNCTION bool pm_buffer_init(pm_buffer_t *buffer);
58
-
59
- /**
60
- * Return the value of the buffer.
61
- *
62
- * @param buffer The buffer to get the value of.
63
- * @returns The value of the buffer.
64
- *
65
- * \public \memberof pm_buffer_t
66
- */
67
- PRISM_EXPORTED_FUNCTION char * pm_buffer_value(const pm_buffer_t *buffer);
68
-
69
- /**
70
- * Return the length of the buffer.
71
- *
72
- * @param buffer The buffer to get the length of.
73
- * @returns The length of the buffer.
74
- *
75
- * \public \memberof pm_buffer_t
76
- */
77
- PRISM_EXPORTED_FUNCTION size_t pm_buffer_length(const pm_buffer_t *buffer);
78
-
79
- /**
80
- * Append the given amount of space as zeroes to the buffer.
81
- *
82
- * @param buffer The buffer to append to.
83
- * @param length The amount of space to append and zero.
84
- */
85
- void pm_buffer_append_zeroes(pm_buffer_t *buffer, size_t length);
86
-
87
- /**
88
- * Append a formatted string to the buffer.
89
- *
90
- * @param buffer The buffer to append to.
91
- * @param format The format string to append.
92
- * @param ... The arguments to the format string.
93
- */
94
- void pm_buffer_append_format(pm_buffer_t *buffer, const char *format, ...) PRISM_ATTRIBUTE_FORMAT(2, 3);
95
-
96
- /**
97
- * Append a string to the buffer.
98
- *
99
- * @param buffer The buffer to append to.
100
- * @param value The string to append.
101
- * @param length The length of the string to append.
102
- */
103
- void pm_buffer_append_string(pm_buffer_t *buffer, const char *value, size_t length);
104
-
105
- /**
106
- * Append a list of bytes to the buffer.
107
- *
108
- * @param buffer The buffer to append to.
109
- * @param value The bytes to append.
110
- * @param length The length of the bytes to append.
111
- */
112
- void pm_buffer_append_bytes(pm_buffer_t *buffer, const uint8_t *value, size_t length);
113
-
114
- /**
115
- * Append a single byte to the buffer.
116
- *
117
- * @param buffer The buffer to append to.
118
- * @param value The byte to append.
119
- */
120
- void pm_buffer_append_byte(pm_buffer_t *buffer, uint8_t value);
121
-
122
- /**
123
- * Append a 32-bit unsigned integer to the buffer as a variable-length integer.
124
- *
125
- * @param buffer The buffer to append to.
126
- * @param value The integer to append.
127
- */
128
- void pm_buffer_append_varuint(pm_buffer_t *buffer, uint32_t value);
129
-
130
- /**
131
- * Append a 32-bit signed integer to the buffer as a variable-length integer.
132
- *
133
- * @param buffer The buffer to append to.
134
- * @param value The integer to append.
135
- */
136
- void pm_buffer_append_varsint(pm_buffer_t *buffer, int32_t value);
137
-
138
- /**
139
- * Append a double to the buffer.
140
- *
141
- * @param buffer The buffer to append to.
142
- * @param value The double to append.
143
- */
144
- void pm_buffer_append_double(pm_buffer_t *buffer, double value);
145
-
146
- /**
147
- * Append a unicode codepoint to the buffer.
148
- *
149
- * @param buffer The buffer to append to.
150
- * @param value The character to append.
151
- * @returns True if the codepoint was valid and appended successfully, false
152
- * otherwise.
153
- */
154
- bool pm_buffer_append_unicode_codepoint(pm_buffer_t *buffer, uint32_t value);
155
-
156
- /**
157
- * The different types of escaping that can be performed by the buffer when
158
- * appending a slice of Ruby source code.
159
- */
160
- typedef enum {
161
- PM_BUFFER_ESCAPING_RUBY,
162
- PM_BUFFER_ESCAPING_JSON
163
- } pm_buffer_escaping_t;
164
-
165
- /**
166
- * Append a slice of source code to the buffer.
167
- *
168
- * @param buffer The buffer to append to.
169
- * @param source The source code to append.
170
- * @param length The length of the source code to append.
171
- * @param escaping The type of escaping to perform.
172
- */
173
- void pm_buffer_append_source(pm_buffer_t *buffer, const uint8_t *source, size_t length, pm_buffer_escaping_t escaping);
174
-
175
- /**
176
- * Prepend the given string to the buffer.
177
- *
178
- * @param buffer The buffer to prepend to.
179
- * @param value The string to prepend.
180
- * @param length The length of the string to prepend.
181
- */
182
- void pm_buffer_prepend_string(pm_buffer_t *buffer, const char *value, size_t length);
183
-
184
- /**
185
- * Concatenate one buffer onto another.
186
- *
187
- * @param destination The buffer to concatenate onto.
188
- * @param source The buffer to concatenate.
189
- */
190
- void pm_buffer_concat(pm_buffer_t *destination, const pm_buffer_t *source);
191
-
192
- /**
193
- * Clear the buffer by reducing its size to 0. This does not free the allocated
194
- * memory, but it does allow the buffer to be reused.
195
- *
196
- * @param buffer The buffer to clear.
197
- */
198
- void pm_buffer_clear(pm_buffer_t *buffer);
199
-
200
- /**
201
- * Strip the whitespace from the end of the buffer.
202
- *
203
- * @param buffer The buffer to strip.
204
- */
205
- void pm_buffer_rstrip(pm_buffer_t *buffer);
206
-
207
- /**
208
- * Checks if the buffer includes the given value.
209
- *
210
- * @param buffer The buffer to check.
211
- * @param value The value to check for.
212
- * @returns The index of the first occurrence of the value in the buffer, or
213
- * SIZE_MAX if the value is not found.
214
- */
215
- size_t pm_buffer_index(const pm_buffer_t *buffer, char value);
216
-
217
- /**
218
- * Insert the given string into the buffer at the given index.
219
- *
220
- * @param buffer The buffer to insert into.
221
- * @param index The index to insert at.
222
- * @param value The string to insert.
223
- * @param length The length of the string to insert.
224
- */
225
- void pm_buffer_insert(pm_buffer_t *buffer, size_t index, const char *value, size_t length);
226
-
227
- /**
228
- * Free the memory associated with the buffer.
229
- *
230
- * @param buffer The buffer to free.
231
- *
232
- * \public \memberof pm_buffer_t
233
- */
234
- PRISM_EXPORTED_FUNCTION void pm_buffer_free(pm_buffer_t *buffer);
235
-
236
- #endif
@@ -1,204 +0,0 @@
1
- /**
2
- * @file pm_char.h
3
- *
4
- * Functions for working with characters and strings.
5
- */
6
- #ifndef PRISM_CHAR_H
7
- #define PRISM_CHAR_H
8
-
9
- #include "prism/defines.h"
10
- #include "prism/util/pm_newline_list.h"
11
-
12
- #include <stdbool.h>
13
- #include <stddef.h>
14
-
15
- /**
16
- * Returns the number of characters at the start of the string that are
17
- * whitespace. Disallows searching past the given maximum number of characters.
18
- *
19
- * @param string The string to search.
20
- * @param length The maximum number of characters to search.
21
- * @return The number of characters at the start of the string that are
22
- * whitespace.
23
- */
24
- size_t pm_strspn_whitespace(const uint8_t *string, ptrdiff_t length);
25
-
26
- /**
27
- * Returns the number of characters at the start of the string that are
28
- * whitespace while also tracking the location of each newline. Disallows
29
- * searching past the given maximum number of characters.
30
- *
31
- * @param string The string to search.
32
- * @param length The maximum number of characters to search.
33
- * @param newline_list The list of newlines to populate.
34
- * @return The number of characters at the start of the string that are
35
- * whitespace.
36
- */
37
- size_t pm_strspn_whitespace_newlines(const uint8_t *string, ptrdiff_t length, pm_newline_list_t *newline_list);
38
-
39
- /**
40
- * Returns the number of characters at the start of the string that are inline
41
- * whitespace. Disallows searching past the given maximum number of characters.
42
- *
43
- * @param string The string to search.
44
- * @param length The maximum number of characters to search.
45
- * @return The number of characters at the start of the string that are inline
46
- * whitespace.
47
- */
48
- size_t pm_strspn_inline_whitespace(const uint8_t *string, ptrdiff_t length);
49
-
50
- /**
51
- * Returns the number of characters at the start of the string that are decimal
52
- * digits. Disallows searching past the given maximum number of characters.
53
- *
54
- * @param string The string to search.
55
- * @param length The maximum number of characters to search.
56
- * @return The number of characters at the start of the string that are decimal
57
- * digits.
58
- */
59
- size_t pm_strspn_decimal_digit(const uint8_t *string, ptrdiff_t length);
60
-
61
- /**
62
- * Returns the number of characters at the start of the string that are
63
- * hexadecimal digits. Disallows searching past the given maximum number of
64
- * characters.
65
- *
66
- * @param string The string to search.
67
- * @param length The maximum number of characters to search.
68
- * @return The number of characters at the start of the string that are
69
- * hexadecimal digits.
70
- */
71
- size_t pm_strspn_hexadecimal_digit(const uint8_t *string, ptrdiff_t length);
72
-
73
- /**
74
- * Returns the number of characters at the start of the string that are octal
75
- * digits or underscores. Disallows searching past the given maximum number of
76
- * characters.
77
- *
78
- * If multiple underscores are found in a row or if an underscore is
79
- * found at the end of the number, then the invalid pointer is set to the index
80
- * of the first invalid underscore.
81
- *
82
- * @param string The string to search.
83
- * @param length The maximum number of characters to search.
84
- * @param invalid The pointer to set to the index of the first invalid
85
- * underscore.
86
- * @return The number of characters at the start of the string that are octal
87
- * digits or underscores.
88
- */
89
- size_t pm_strspn_octal_number(const uint8_t *string, ptrdiff_t length, const uint8_t **invalid);
90
-
91
- /**
92
- * Returns the number of characters at the start of the string that are decimal
93
- * digits or underscores. Disallows searching past the given maximum number of
94
- * characters.
95
- *
96
- * If multiple underscores are found in a row or if an underscore is
97
- * found at the end of the number, then the invalid pointer is set to the index
98
- * of the first invalid underscore.
99
- *
100
- * @param string The string to search.
101
- * @param length The maximum number of characters to search.
102
- * @param invalid The pointer to set to the index of the first invalid
103
- * underscore.
104
- * @return The number of characters at the start of the string that are decimal
105
- * digits or underscores.
106
- */
107
- size_t pm_strspn_decimal_number(const uint8_t *string, ptrdiff_t length, const uint8_t **invalid);
108
-
109
- /**
110
- * Returns the number of characters at the start of the string that are
111
- * hexadecimal digits or underscores. Disallows searching past the given maximum
112
- * number of characters.
113
- *
114
- * If multiple underscores are found in a row or if an underscore is
115
- * found at the end of the number, then the invalid pointer is set to the index
116
- * of the first invalid underscore.
117
- *
118
- * @param string The string to search.
119
- * @param length The maximum number of characters to search.
120
- * @param invalid The pointer to set to the index of the first invalid
121
- * underscore.
122
- * @return The number of characters at the start of the string that are
123
- * hexadecimal digits or underscores.
124
- */
125
- size_t pm_strspn_hexadecimal_number(const uint8_t *string, ptrdiff_t length, const uint8_t **invalid);
126
-
127
- /**
128
- * Returns the number of characters at the start of the string that are regexp
129
- * options. Disallows searching past the given maximum number of characters.
130
- *
131
- * @param string The string to search.
132
- * @param length The maximum number of characters to search.
133
- * @return The number of characters at the start of the string that are regexp
134
- * options.
135
- */
136
- size_t pm_strspn_regexp_option(const uint8_t *string, ptrdiff_t length);
137
-
138
- /**
139
- * Returns the number of characters at the start of the string that are binary
140
- * digits or underscores. Disallows searching past the given maximum number of
141
- * characters.
142
- *
143
- * If multiple underscores are found in a row or if an underscore is
144
- * found at the end of the number, then the invalid pointer is set to the index
145
- * of the first invalid underscore.
146
- *
147
- * @param string The string to search.
148
- * @param length The maximum number of characters to search.
149
- * @param invalid The pointer to set to the index of the first invalid
150
- * underscore.
151
- * @return The number of characters at the start of the string that are binary
152
- * digits or underscores.
153
- */
154
- size_t pm_strspn_binary_number(const uint8_t *string, ptrdiff_t length, const uint8_t **invalid);
155
-
156
- /**
157
- * Returns true if the given character is a whitespace character.
158
- *
159
- * @param b The character to check.
160
- * @return True if the given character is a whitespace character.
161
- */
162
- bool pm_char_is_whitespace(const uint8_t b);
163
-
164
- /**
165
- * Returns true if the given character is an inline whitespace character.
166
- *
167
- * @param b The character to check.
168
- * @return True if the given character is an inline whitespace character.
169
- */
170
- bool pm_char_is_inline_whitespace(const uint8_t b);
171
-
172
- /**
173
- * Returns true if the given character is a binary digit.
174
- *
175
- * @param b The character to check.
176
- * @return True if the given character is a binary digit.
177
- */
178
- bool pm_char_is_binary_digit(const uint8_t b);
179
-
180
- /**
181
- * Returns true if the given character is an octal digit.
182
- *
183
- * @param b The character to check.
184
- * @return True if the given character is an octal digit.
185
- */
186
- bool pm_char_is_octal_digit(const uint8_t b);
187
-
188
- /**
189
- * Returns true if the given character is a decimal digit.
190
- *
191
- * @param b The character to check.
192
- * @return True if the given character is a decimal digit.
193
- */
194
- bool pm_char_is_decimal_digit(const uint8_t b);
195
-
196
- /**
197
- * Returns true if the given character is a hexadecimal digit.
198
- *
199
- * @param b The character to check.
200
- * @return True if the given character is a hexadecimal digit.
201
- */
202
- bool pm_char_is_hexadecimal_digit(const uint8_t b);
203
-
204
- #endif