static_literal_parser 1.0.0 → 1.1.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.
- checksums.yaml +4 -4
- data/lib/static_literal_parser.rb +2 -2
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cc0aad9cacc1025e4ce59cab95bc7f076a21248def58633f8667a5279dc0866
|
4
|
+
data.tar.gz: 1376efeb662024a50b6e315281915f80232948f059e23e9afbe85443c26724da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37147605518d3d1a32f5e5bb2e701c09b9e3118bc9d685b2958d48c421a12292b4c701e5c846dbde51945585ac156f00222da998d867d1df14357e189bbb35dd
|
7
|
+
data.tar.gz: 69a957bb156cb283e60f4089552af90a3f2ef052ad44a3d6e082c90655ce18cb68f0de75f36d725f6705d9e1a237a3654a68aeedc9a695cd3fa53307a6461007
|
@@ -9,8 +9,8 @@ module StaticLiteralParser
|
|
9
9
|
case node.type
|
10
10
|
when :SCOPE
|
11
11
|
parse_(node.children[2], constants)
|
12
|
-
when :LIST, :ZLIST
|
13
|
-
node.children[..-2].map { parse_(
|
12
|
+
when :LIST, :ZLIST, :ZARRAY, :ARRAY
|
13
|
+
node.children[0..-2].map {|x| parse_(x, constants) }
|
14
14
|
when :HASH
|
15
15
|
Hash[*parse_(node.children[0], constants)]
|
16
16
|
when :LIT, :STR
|
metadata
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: static_literal_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatsuhiro Ujihisa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: StaticLiteralParser is a RubyGems library that you can convert a String
|
14
|
+
to a Ruby object, parsing the string as an executable Ruby code, but without actually
|
15
|
+
executing it. This internally uses RubyVM::AbstractSyntaxTree to parse to construct
|
16
|
+
the object.
|
14
17
|
email: ujihisa at gmail com
|
15
18
|
executables: []
|
16
19
|
extensions: []
|
@@ -36,8 +39,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
36
39
|
- !ruby/object:Gem::Version
|
37
40
|
version: '0'
|
38
41
|
requirements: []
|
39
|
-
rubygems_version: 3.
|
42
|
+
rubygems_version: 3.0.3
|
40
43
|
signing_key:
|
41
44
|
specification_version: 4
|
42
|
-
summary:
|
45
|
+
summary: StaticLiteralParser.parse(str, constants)
|
43
46
|
test_files: []
|