yarp 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -8
  3. data/CONTRIBUTING.md +2 -2
  4. data/Makefile +5 -5
  5. data/README.md +11 -12
  6. data/config.yml +6 -2
  7. data/docs/build_system.md +21 -21
  8. data/docs/building.md +4 -4
  9. data/docs/configuration.md +25 -21
  10. data/docs/design.md +2 -2
  11. data/docs/encoding.md +17 -17
  12. data/docs/fuzzing.md +4 -4
  13. data/docs/heredocs.md +3 -3
  14. data/docs/mapping.md +94 -94
  15. data/docs/ripper.md +4 -4
  16. data/docs/ruby_api.md +11 -11
  17. data/docs/serialization.md +17 -16
  18. data/docs/testing.md +6 -6
  19. data/ext/prism/api_node.c +4725 -0
  20. data/ext/{yarp → prism}/api_pack.c +82 -82
  21. data/ext/{yarp → prism}/extconf.rb +13 -13
  22. data/ext/{yarp → prism}/extension.c +175 -168
  23. data/ext/prism/extension.h +18 -0
  24. data/include/prism/ast.h +1932 -0
  25. data/include/prism/defines.h +45 -0
  26. data/include/prism/diagnostic.h +231 -0
  27. data/include/{yarp/enc/yp_encoding.h → prism/enc/pm_encoding.h} +40 -40
  28. data/include/prism/node.h +41 -0
  29. data/include/prism/pack.h +141 -0
  30. data/include/{yarp → prism}/parser.h +143 -142
  31. data/include/prism/regexp.h +19 -0
  32. data/include/prism/unescape.h +48 -0
  33. data/include/prism/util/pm_buffer.h +51 -0
  34. data/include/{yarp/util/yp_char.h → prism/util/pm_char.h} +20 -20
  35. data/include/{yarp/util/yp_constant_pool.h → prism/util/pm_constant_pool.h} +26 -22
  36. data/include/{yarp/util/yp_list.h → prism/util/pm_list.h} +21 -21
  37. data/include/prism/util/pm_memchr.h +14 -0
  38. data/include/{yarp/util/yp_newline_list.h → prism/util/pm_newline_list.h} +11 -11
  39. data/include/prism/util/pm_state_stack.h +24 -0
  40. data/include/{yarp/util/yp_string.h → prism/util/pm_string.h} +20 -20
  41. data/include/prism/util/pm_string_list.h +25 -0
  42. data/include/{yarp/util/yp_strpbrk.h → prism/util/pm_strpbrk.h} +7 -7
  43. data/include/prism/version.h +4 -0
  44. data/include/prism.h +82 -0
  45. data/lib/prism/compiler.rb +465 -0
  46. data/lib/prism/debug.rb +157 -0
  47. data/lib/{yarp/desugar_visitor.rb → prism/desugar_compiler.rb} +4 -2
  48. data/lib/prism/dispatcher.rb +2051 -0
  49. data/lib/prism/dsl.rb +750 -0
  50. data/lib/{yarp → prism}/ffi.rb +66 -67
  51. data/lib/{yarp → prism}/lex_compat.rb +40 -43
  52. data/lib/{yarp/mutation_visitor.rb → prism/mutation_compiler.rb} +3 -3
  53. data/lib/{yarp → prism}/node.rb +2012 -2593
  54. data/lib/prism/node_ext.rb +55 -0
  55. data/lib/prism/node_inspector.rb +68 -0
  56. data/lib/{yarp → prism}/pack.rb +1 -1
  57. data/lib/{yarp → prism}/parse_result/comments.rb +1 -1
  58. data/lib/{yarp → prism}/parse_result/newlines.rb +1 -1
  59. data/lib/prism/parse_result.rb +266 -0
  60. data/lib/{yarp → prism}/pattern.rb +14 -14
  61. data/lib/{yarp → prism}/ripper_compat.rb +5 -5
  62. data/lib/{yarp → prism}/serialize.rb +12 -7
  63. data/lib/prism/visitor.rb +470 -0
  64. data/lib/prism.rb +64 -0
  65. data/lib/yarp.rb +2 -614
  66. data/src/diagnostic.c +213 -208
  67. data/src/enc/pm_big5.c +52 -0
  68. data/src/enc/pm_euc_jp.c +58 -0
  69. data/src/enc/{yp_gbk.c → pm_gbk.c} +16 -16
  70. data/src/enc/pm_shift_jis.c +56 -0
  71. data/src/enc/{yp_tables.c → pm_tables.c} +69 -69
  72. data/src/enc/{yp_unicode.c → pm_unicode.c} +40 -40
  73. data/src/enc/pm_windows_31j.c +56 -0
  74. data/src/node.c +1293 -1233
  75. data/src/pack.c +247 -247
  76. data/src/prettyprint.c +1479 -1479
  77. data/src/{yarp.c → prism.c} +5205 -5083
  78. data/src/regexp.c +132 -132
  79. data/src/serialize.c +1121 -1121
  80. data/src/token_type.c +169 -167
  81. data/src/unescape.c +106 -87
  82. data/src/util/pm_buffer.c +103 -0
  83. data/src/util/{yp_char.c → pm_char.c} +72 -72
  84. data/src/util/{yp_constant_pool.c → pm_constant_pool.c} +85 -64
  85. data/src/util/{yp_list.c → pm_list.c} +10 -10
  86. data/src/util/{yp_memchr.c → pm_memchr.c} +6 -4
  87. data/src/util/{yp_newline_list.c → pm_newline_list.c} +21 -21
  88. data/src/util/{yp_state_stack.c → pm_state_stack.c} +4 -4
  89. data/src/util/{yp_string.c → pm_string.c} +38 -38
  90. data/src/util/pm_string_list.c +29 -0
  91. data/src/util/{yp_strncasecmp.c → pm_strncasecmp.c} +1 -1
  92. data/src/util/{yp_strpbrk.c → pm_strpbrk.c} +8 -8
  93. data/yarp.gemspec +68 -59
  94. metadata +70 -61
  95. data/ext/yarp/api_node.c +0 -4728
  96. data/ext/yarp/extension.h +0 -18
  97. data/include/yarp/ast.h +0 -1929
  98. data/include/yarp/defines.h +0 -45
  99. data/include/yarp/diagnostic.h +0 -226
  100. data/include/yarp/node.h +0 -42
  101. data/include/yarp/pack.h +0 -141
  102. data/include/yarp/regexp.h +0 -19
  103. data/include/yarp/unescape.h +0 -44
  104. data/include/yarp/util/yp_buffer.h +0 -51
  105. data/include/yarp/util/yp_memchr.h +0 -14
  106. data/include/yarp/util/yp_state_stack.h +0 -24
  107. data/include/yarp/util/yp_string_list.h +0 -25
  108. data/include/yarp/version.h +0 -4
  109. data/include/yarp.h +0 -82
  110. data/src/enc/yp_big5.c +0 -52
  111. data/src/enc/yp_euc_jp.c +0 -58
  112. data/src/enc/yp_shift_jis.c +0 -56
  113. data/src/enc/yp_windows_31j.c +0 -56
  114. data/src/util/yp_buffer.c +0 -101
  115. data/src/util/yp_string_list.c +0 -29
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yarp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-16 00:00:00.000000000 Z
11
+ date: 2023-09-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
15
15
  - ruby@shopify.com
16
16
  executables: []
17
17
  extensions:
18
- - ext/yarp/extconf.rb
18
+ - ext/prism/extconf.rb
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - CHANGELOG.md
@@ -37,73 +37,82 @@ files:
37
37
  - docs/ruby_api.md
38
38
  - docs/serialization.md
39
39
  - docs/testing.md
40
- - ext/yarp/api_node.c
41
- - ext/yarp/api_pack.c
42
- - ext/yarp/extconf.rb
43
- - ext/yarp/extension.c
44
- - ext/yarp/extension.h
45
- - include/yarp.h
46
- - include/yarp/ast.h
47
- - include/yarp/defines.h
48
- - include/yarp/diagnostic.h
49
- - include/yarp/enc/yp_encoding.h
50
- - include/yarp/node.h
51
- - include/yarp/pack.h
52
- - include/yarp/parser.h
53
- - include/yarp/regexp.h
54
- - include/yarp/unescape.h
55
- - include/yarp/util/yp_buffer.h
56
- - include/yarp/util/yp_char.h
57
- - include/yarp/util/yp_constant_pool.h
58
- - include/yarp/util/yp_list.h
59
- - include/yarp/util/yp_memchr.h
60
- - include/yarp/util/yp_newline_list.h
61
- - include/yarp/util/yp_state_stack.h
62
- - include/yarp/util/yp_string.h
63
- - include/yarp/util/yp_string_list.h
64
- - include/yarp/util/yp_strpbrk.h
65
- - include/yarp/version.h
40
+ - ext/prism/api_node.c
41
+ - ext/prism/api_pack.c
42
+ - ext/prism/extconf.rb
43
+ - ext/prism/extension.c
44
+ - ext/prism/extension.h
45
+ - include/prism.h
46
+ - include/prism/ast.h
47
+ - include/prism/defines.h
48
+ - include/prism/diagnostic.h
49
+ - include/prism/enc/pm_encoding.h
50
+ - include/prism/node.h
51
+ - include/prism/pack.h
52
+ - include/prism/parser.h
53
+ - include/prism/regexp.h
54
+ - include/prism/unescape.h
55
+ - include/prism/util/pm_buffer.h
56
+ - include/prism/util/pm_char.h
57
+ - include/prism/util/pm_constant_pool.h
58
+ - include/prism/util/pm_list.h
59
+ - include/prism/util/pm_memchr.h
60
+ - include/prism/util/pm_newline_list.h
61
+ - include/prism/util/pm_state_stack.h
62
+ - include/prism/util/pm_string.h
63
+ - include/prism/util/pm_string_list.h
64
+ - include/prism/util/pm_strpbrk.h
65
+ - include/prism/version.h
66
+ - lib/prism.rb
67
+ - lib/prism/compiler.rb
68
+ - lib/prism/debug.rb
69
+ - lib/prism/desugar_compiler.rb
70
+ - lib/prism/dispatcher.rb
71
+ - lib/prism/dsl.rb
72
+ - lib/prism/ffi.rb
73
+ - lib/prism/lex_compat.rb
74
+ - lib/prism/mutation_compiler.rb
75
+ - lib/prism/node.rb
76
+ - lib/prism/node_ext.rb
77
+ - lib/prism/node_inspector.rb
78
+ - lib/prism/pack.rb
79
+ - lib/prism/parse_result.rb
80
+ - lib/prism/parse_result/comments.rb
81
+ - lib/prism/parse_result/newlines.rb
82
+ - lib/prism/pattern.rb
83
+ - lib/prism/ripper_compat.rb
84
+ - lib/prism/serialize.rb
85
+ - lib/prism/visitor.rb
66
86
  - lib/yarp.rb
67
- - lib/yarp/desugar_visitor.rb
68
- - lib/yarp/ffi.rb
69
- - lib/yarp/lex_compat.rb
70
- - lib/yarp/mutation_visitor.rb
71
- - lib/yarp/node.rb
72
- - lib/yarp/pack.rb
73
- - lib/yarp/parse_result/comments.rb
74
- - lib/yarp/parse_result/newlines.rb
75
- - lib/yarp/pattern.rb
76
- - lib/yarp/ripper_compat.rb
77
- - lib/yarp/serialize.rb
78
87
  - src/diagnostic.c
79
- - src/enc/yp_big5.c
80
- - src/enc/yp_euc_jp.c
81
- - src/enc/yp_gbk.c
82
- - src/enc/yp_shift_jis.c
83
- - src/enc/yp_tables.c
84
- - src/enc/yp_unicode.c
85
- - src/enc/yp_windows_31j.c
88
+ - src/enc/pm_big5.c
89
+ - src/enc/pm_euc_jp.c
90
+ - src/enc/pm_gbk.c
91
+ - src/enc/pm_shift_jis.c
92
+ - src/enc/pm_tables.c
93
+ - src/enc/pm_unicode.c
94
+ - src/enc/pm_windows_31j.c
86
95
  - src/node.c
87
96
  - src/pack.c
88
97
  - src/prettyprint.c
98
+ - src/prism.c
89
99
  - src/regexp.c
90
100
  - src/serialize.c
91
101
  - src/token_type.c
92
102
  - src/unescape.c
93
- - src/util/yp_buffer.c
94
- - src/util/yp_char.c
95
- - src/util/yp_constant_pool.c
96
- - src/util/yp_list.c
97
- - src/util/yp_memchr.c
98
- - src/util/yp_newline_list.c
99
- - src/util/yp_state_stack.c
100
- - src/util/yp_string.c
101
- - src/util/yp_string_list.c
102
- - src/util/yp_strncasecmp.c
103
- - src/util/yp_strpbrk.c
104
- - src/yarp.c
103
+ - src/util/pm_buffer.c
104
+ - src/util/pm_char.c
105
+ - src/util/pm_constant_pool.c
106
+ - src/util/pm_list.c
107
+ - src/util/pm_memchr.c
108
+ - src/util/pm_newline_list.c
109
+ - src/util/pm_state_stack.c
110
+ - src/util/pm_string.c
111
+ - src/util/pm_string_list.c
112
+ - src/util/pm_strncasecmp.c
113
+ - src/util/pm_strpbrk.c
105
114
  - yarp.gemspec
106
- homepage: https://github.com/ruby/yarp
115
+ homepage: https://github.com/ruby/prism
107
116
  licenses:
108
117
  - MIT
109
118
  metadata:
@@ -126,5 +135,5 @@ requirements: []
126
135
  rubygems_version: 3.4.1
127
136
  signing_key:
128
137
  specification_version: 4
129
- summary: Yet Another Ruby Parser
138
+ summary: Prism Ruby parser
130
139
  test_files: []