sirop 0.5 → 0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eee92f9d96e1938e770c3c2eb445e43a68c67920e3e885a8016f2150ce429ec5
4
- data.tar.gz: 5a7ebbb732eae90b4b3f35f54728f118684eab3f32575ce6000795310a6ca541
3
+ metadata.gz: 30ef982b49313b55ac8b76d8886f406ee315421080e728bc1d9cdf05bcce93e7
4
+ data.tar.gz: 40c33682b5c44f10e242049041f40f20f58a2939340debb858307b5bc12b9319
5
5
  SHA512:
6
- metadata.gz: bda8d3c698363b564d14077994cb96ccaabbf1408bab88e37492d88ec30d251926af93340ac376174b7f7c18f27408b9ab942bc68a16d3fdc27b32755d9209aa
7
- data.tar.gz: 2a84dd4f5586e18f2a5b2eb87759285b20b422e484e6d4afebd58fd10a707a4baa962713b296c9b36a45b8a219b10552ceae3e29e8882e36c26022f9dc144371
6
+ metadata.gz: 9d92a9e43cfa127c5d2a8e1ccb963ea38e66b54670c0a33558a874a95e5b3ae11fc9092d5b69c0486828a8a759bb6a20c4596280e90e3f1285928badc1da9d55
7
+ data.tar.gz: e5f76b7f45f7fd5a6ddb94613aa381b7f36ecc737f1c5c62a19c3257f48398509e61df2439b6b3d2716cbc80d8605cafe349174e6c61c4b21173e6ab7f21dbd6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.6 2025-07-23
2
+
3
+ - Update to current version of Prism
4
+
1
5
  # 2025-01-09 0.5
2
6
 
3
7
  - Add after_body hook for lambdas
@@ -25,3 +29,4 @@
25
29
  # 2024-02-20 0.1
26
30
 
27
31
  - Find node for a given `Proc` object
32
+ -
@@ -21,7 +21,7 @@ module Sirop
21
21
  class_variable_read: :emit_verbatim,
22
22
  class_variable_target: :emit_verbatim,
23
23
  class_variable_write: [:name_loc, :operator_loc, :value],
24
- constant_path: [:parent, :delimiter_loc, :child],
24
+ constant_path: [:parent, :delimiter_loc, :name_loc],
25
25
  constant_path_write: [:target, :operator_loc, :value],
26
26
  constant_read: :emit_verbatim,
27
27
  constant_write: [:name_loc, :operator_loc, :value],
@@ -49,7 +49,7 @@ module Sirop
49
49
  keyword_rest_parameter: [:operator_loc, :name_loc],
50
50
  keyword_parameter: :emit_verbatim,
51
51
  local_variable_and_write: [:name_loc, :operator_loc, :value],
52
- local_variable_operator_write: [:name_loc, :operator_loc, :value],
52
+ local_variable_operator_write: [:name_loc, :binary_operator_loc, :value],
53
53
  local_variable_or_write: [:name_loc, :operator_loc, :value],
54
54
  local_variable_read: :emit_verbatim,
55
55
  local_variable_target: :emit_verbatim,
@@ -286,7 +286,7 @@ module Sirop
286
286
  emit_code(node.predicate)
287
287
  emit_code(node.then_keyword_loc)
288
288
  emit_code(node.statements, semicolon: true)
289
- emit_code(node.consequent) if node.consequent
289
+ emit_code(node.subsequent) if node.subsequent
290
290
  emit_code(node.end_keyword_loc, semicolon: true) if node.if_keyword_loc.slice == 'if'
291
291
  end
292
292
 
@@ -294,7 +294,7 @@ module Sirop
294
294
  emit_code(node.predicate)
295
295
  emit_code(node.then_keyword_loc)
296
296
  emit_code(node.statements)
297
- emit_code(node.consequent)
297
+ emit_code(node.subsequent)
298
298
  end
299
299
 
300
300
  def visit_if_node_guard(node)
@@ -313,7 +313,7 @@ module Sirop
313
313
  emit_code(node.then_keyword_loc)
314
314
  @semicolon = true
315
315
  emit_code(node.statements)
316
- emit_code(node.consequent) if node.consequent
316
+ emit_code(node.else_clause) if node.else_clause
317
317
  emit_code(node.end_keyword_loc, semicolon: true) if node.keyword_loc.slice == 'unless'
318
318
  end
319
319
 
@@ -327,7 +327,7 @@ module Sirop
327
327
  emit_code(node.case_keyword_loc)
328
328
  emit_code(node.predicate)
329
329
  node.conditions.each { |c| emit_code(c, semicolon: true) }
330
- emit_code(node.consequent, semicolon: true)
330
+ emit_code(node.else_clause, semicolon: true)
331
331
  emit_code(node.end_keyword_loc, semicolon: true)
332
332
  end
333
333
 
@@ -492,7 +492,7 @@ module Sirop
492
492
  emit_code(node.operator_loc)
493
493
  emit_code(node.reference)
494
494
  emit_code(node.statements, semicolon: true)
495
- emit_code(node.consequent)
495
+ emit_code(node.subsequent)
496
496
  end
497
497
 
498
498
  def visit_begin_node(node)
data/lib/sirop/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Sirop
2
2
  # Sirop version
3
- VERSION = '0.5'
3
+ VERSION = '0.6'
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sirop
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: prism
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.27.0
18
+ version: 1.4.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.27.0
25
+ version: 1.4.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: minitest
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.6.2
79
+ rubygems_version: 3.6.8
80
80
  specification_version: 4
81
81
  summary: 'Sirop: Ruby code rewriter'
82
82
  test_files: []