ios_parser 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/CHANGELOG.md +7 -0
- data/Rakefile +5 -1
- data/ios_parser.gemspec +3 -1
- data/lib/ios_parser/version.rb +1 -1
- data/lib/ios_parser.rb +5 -1
- data/spec/lib/ios_parser/lexer_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70ba90a49c66d3aeb9508337c1a018353bae30ba
|
4
|
+
data.tar.gz: 326039e8f3eb1aa6dca37843799598cbc48db944
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bab554233dcbadf4973c3d3b2221d401b5b4fe955eb54d1def89dd3b43da584af7638f7a3d6c984f9fb9a00471f7fa27a9e4423d59c62441d776180ce7180b25
|
7
|
+
data.tar.gz: 076d66dd99628d7d5ada809147599243c065f346b8b0dbc4b25d34a4444bec01555c7583e4a299f536703d37a827a96340838cfbc9e57a274a28f51364322fb5
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
data/ios_parser.gemspec
CHANGED
@@ -13,7 +13,9 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = `git ls-files`.split("\n")
|
14
14
|
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
15
15
|
|
16
|
-
|
16
|
+
unless RUBY_ENGINE == 'jruby'
|
17
|
+
s.extensions << 'ext/ios_parser/c_lexer/extconf.rb'
|
18
|
+
end
|
17
19
|
|
18
20
|
s.add_development_dependency 'rspec', '~>3.2'
|
19
21
|
s.add_development_dependency 'rubocop', '~>0.37'
|
data/lib/ios_parser/version.rb
CHANGED
data/lib/ios_parser.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
3
|
module IOSParser
|
4
|
+
class LexError < StandardError; end
|
5
|
+
|
4
6
|
def self.lexer
|
5
7
|
if const_defined?(:PureLexer)
|
6
8
|
PureLexer
|
@@ -8,10 +10,12 @@ module IOSParser
|
|
8
10
|
require_relative 'ios_parser/c_lexer'
|
9
11
|
CLexer
|
10
12
|
end
|
13
|
+
rescue LoadError
|
14
|
+
require 'ios_parser/lexer'
|
15
|
+
return PureLexer
|
11
16
|
end
|
12
17
|
|
13
18
|
Lexer = lexer
|
14
|
-
class LexError < StandardError; end
|
15
19
|
end
|
16
20
|
|
17
21
|
require_relative 'ios_parser/ios'
|
@@ -80,8 +80,8 @@ END
|
|
80
80
|
expect(tokens.map(&:last)).to eq expectation
|
81
81
|
end # it 'pure' do
|
82
82
|
|
83
|
-
it '
|
84
|
-
tokens = IOSParser
|
83
|
+
it 'default' do
|
84
|
+
tokens = IOSParser.lexer.new.call(input)
|
85
85
|
expect(tokens.map(&:last)).to eq expectation
|
86
86
|
end # it 'c' do
|
87
87
|
end # context 'indented region' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ios_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Miller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|