vernacular-ast 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/vernacular/ast/ast_parser.rb +2 -2
- data/lib/vernacular/ast/modifier.rb +1 -1
- data/lib/vernacular/ast/version.rb +1 -1
- data/vernacular-ast.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7187ff930a2ae06db45ed8ccf45de390dbf1ad53346134e179bf78f1953c00c6
|
4
|
+
data.tar.gz: f808d6e516875fddc66f0386f276e8fbff6a8e1b11588178d7c7a977308cc661
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f87a91632829d79819c827b492b44cb23619adf842263dc13b15c76d4679bc7b699bc97ba558f7687f2c8ea2d979685432bfb4407495c5297465cebcdf1e973
|
7
|
+
data.tar.gz: af2082a27e2fd9945e9e7ebadd55979ff942c1110f21c118ff9e01f82f65a0e693255aef6c8d79cbb446c0c155f8e225506f96d6105a5f35059a1031742957ef
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vernacular-ast (0.0
|
5
|
-
parser (~> 2.
|
4
|
+
vernacular-ast (0.1.0)
|
5
|
+
parser (~> 2.5)
|
6
6
|
racc (~> 1.4)
|
7
7
|
vernacular (~> 1.0)
|
8
8
|
|
@@ -12,8 +12,8 @@ GEM
|
|
12
12
|
ast (2.4.0)
|
13
13
|
minitest (5.11.3)
|
14
14
|
parallel (1.12.1)
|
15
|
-
parser (2.
|
16
|
-
ast (~> 2.
|
15
|
+
parser (2.5.0.0)
|
16
|
+
ast (~> 2.4.0)
|
17
17
|
powerpack (0.1.1)
|
18
18
|
racc (1.4.14)
|
19
19
|
rainbow (3.0.0)
|
@@ -75,8 +75,8 @@ module Vernacular
|
|
75
75
|
# rubocop:enable Metrics/MethodLength
|
76
76
|
|
77
77
|
def parser_source
|
78
|
-
filepath, = Parser.method(:
|
79
|
-
grammar_filepath = "../../
|
78
|
+
filepath, = Parser::Base.method(:parse).source_location
|
79
|
+
grammar_filepath = "../../parser/ruby#{parser_version}.y"
|
80
80
|
File.read(File.expand_path(grammar_filepath, filepath))
|
81
81
|
end
|
82
82
|
|
@@ -45,7 +45,7 @@ module Vernacular
|
|
45
45
|
def modify(source)
|
46
46
|
raise 'You must first configure a rewriter!' unless rewriter_block
|
47
47
|
|
48
|
-
rewriter = Class.new(Parser::
|
48
|
+
rewriter = Class.new(Parser::TreeRewriter, &rewriter_block).new
|
49
49
|
rewriter.instance_variable_set(:@parser, ASTParser.parser)
|
50
50
|
|
51
51
|
buffer = Parser::Source::Buffer.new('<dynamic>')
|
data/vernacular-ast.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.add_dependency 'parser', '~> 2.
|
24
|
+
spec.add_dependency 'parser', '~> 2.5'
|
25
25
|
spec.add_dependency 'racc', '~> 1.4'
|
26
26
|
spec.add_dependency 'vernacular', '~> 1.0'
|
27
27
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vernacular-ast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Deisz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: racc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|