parser_node_ext 1.1.1 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fac844753c169838574a48c56d9ea740d7de80bbe80e2d5edf8dc199c59ea512
4
- data.tar.gz: 0caa0e5dba4f6769ad2d01ed011a01c2c7266d29adf102508482f185421fdef4
3
+ metadata.gz: e485be85a8f56d3b4e733422f69f2d599a7eb9373fd5722e223ee66dec50e83d
4
+ data.tar.gz: 575f6097c6efdf2d1eb78b4034f27113a382f232ae26adfd894dd9d899069cd1
5
5
  SHA512:
6
- metadata.gz: af230faaea69ad75bd6c4afddc4b0cce04498fb173c260f175164e954377ee7198721cb19ddf3eba764ba9da12b42b6b5764dd2b687342f277d7bff37b8f1444
7
- data.tar.gz: 989b25efea51c0b4d732e9db822e1450c6b67e7f079af6de96fe71849f48141c894980e7d402eeca56a6014bb227d418e9cccde92adc2385a7f8949b398d2059
6
+ metadata.gz: dde07b7e09dd4c4fa15d951c64108e9c9b89d38b277fd9f2bad7c471cb3944cbecaa73965e9c0fa6287077050a61d99855d463412a96ef6b68d0186e9d6ba443
7
+ data.tar.gz: e8f1d5199bb2f1e74128ccda223c569b194d30e6d0f43d55fb9fec98ebb5bdd3a28de3ca760ae5a451157a30b3b81e7005b0f3d905ff563dd9fd573f7826c122
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.1.3 (2023-06-08)
4
+
5
+ * `node_type` instead of `type` in `to_hash` output
6
+
3
7
  ## 1.1.1 (2023-05-19)
4
8
 
5
9
  * Remove rbs
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parser_node_ext (1.1.1)
4
+ parser_node_ext (1.1.3)
5
5
  parser
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  It assigns names to the child nodes of the [parser](https://rubygems.org/gems/parser).
4
4
 
5
+ ```ruby
6
+ # node is a send node
7
+ node.receiver # get the receiver of node
8
+ node.message # get the message of node
9
+ node.arguments # get the arguments of node
10
+ ```
11
+
5
12
  It also adds some helpers
6
13
 
7
14
  ```ruby
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ParserNodeExt
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.3"
5
5
  end
@@ -437,7 +437,7 @@ module ParserNodeExt
437
437
 
438
438
  # Convert node to a hash, so that it can be converted to a json.
439
439
  def to_hash
440
- result = { type: type }
440
+ result = { node_type: type }
441
441
  if TYPE_CHILDREN[type]
442
442
  TYPE_CHILDREN[type].each do |key|
443
443
  value = send(key)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser_node_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-19 00:00:00.000000000 Z
11
+ date: 2023-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 3.4.10
65
+ rubygems_version: 3.4.13
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: extend parser node