lexical_analyzer 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lexical_analyzer.gemspec +0 -1
- data/lib/lexical_analyzer.rb +2 -2
- data/lib/lexical_analyzer/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 396e498e6a5af84157634b7af033d30fac83337c
|
4
|
+
data.tar.gz: 8e3e81c32f11fca1b8505a2763bf48f8b8d201bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 152766b4126e30171b0392a296ae2a9ce7d185375acb81faed4b2b7ed0fd927eb545966e40c6655744418c282517bc9265bd687c34c7ba60ced630a3a856424d
|
7
|
+
data.tar.gz: 44896f897d7d94945fa0e6508c19bba89c4ba8217601bf05e404576cc0e7c31ee821901819ee983c91b718560f9d73dc558e39069515e278c0c841d99aa7adc5
|
data/lexical_analyzer.gemspec
CHANGED
@@ -22,6 +22,5 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.15"
|
23
23
|
spec.add_development_dependency "rake", ">= 12.3.3"
|
24
24
|
spec.add_development_dependency "minitest", "~> 5.0"
|
25
|
-
spec.add_development_dependency 'minitest_visible', "~> 0.1"
|
26
25
|
spec.add_development_dependency 'reek', "~> 5.0.2"
|
27
26
|
end
|
data/lib/lexical_analyzer.rb
CHANGED
@@ -23,8 +23,8 @@ class LexicalAnalyzer
|
|
23
23
|
end
|
24
24
|
|
25
25
|
# Get the next lexical token
|
26
|
-
def get(extra=
|
27
|
-
(rules + extra).each do |rule|
|
26
|
+
def get(extra=nil)
|
27
|
+
(extra ? rules + extra : rules).each do |rule|
|
28
28
|
if match_data = rule.match(text)
|
29
29
|
@text = match_data.post_match
|
30
30
|
return rule.call(match_data.to_s) || get
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lexical_analyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PeterCamilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: minitest_visible
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.1'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.1'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: reek
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|