sorbet-cfg 0.1.0 → 0.1.1

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: 48c8482457e5a75f4cc1ecffb77c1fbeb9c84b7d6ca875321ebcea98d4ef93d1
4
- data.tar.gz: 56a087dffb2f6007debd11e60b03492344a866ce1b9af55d2a8f1da4164cda16
3
+ metadata.gz: 0d75c08f72b86ae763df3638cebcc78ede774a61c32d7090b858cddb146717fa
4
+ data.tar.gz: c71493b29d12746571df86bbef04c7be9b74e4096f964a9cfb98f2400d893b60
5
5
  SHA512:
6
- metadata.gz: 199335bf741fe283f281fda0c79d6299b82207f0098814c32321883e721fed2df24926108c62568049380d4fb2635627d1b6eaacc2383d591a25ec8867f3a827
7
- data.tar.gz: 44eeff0c0185f951cbea1133e9aba24c839c81294a82223a5160fb5974a92d05ae6b706831134c68dad1dd0110cc71682130c9a45417882ed9081b4354e2009a
6
+ metadata.gz: adb046e04d8c0da350f323fb64fb22f769ae81f6faedcaeeecd11d83c2e5a377061da117a39e5843c6ee65f5a75ce3340a45af4e7e72c3d6df1e1a7e147a57e8
7
+ data.tar.gz: ac720c1d6fe1c9a6a78256c3848f3681e9d3f8a61ab87374315e83d7dc3294dee6ef6c95094a5fe4b4b604280f8a09ed65d373fb34c71fec083052a6f12e0858
data/Gemfile CHANGED
@@ -2,9 +2,3 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in sorbet-cfg.gemspec
4
4
  gemspec
5
-
6
- gem "parslet", "~> 1.8"
7
-
8
- gem "rspec", "~> 3.9"
9
-
10
- gem "sorbet-runtime", "~> 0.4.5005"
data/Gemfile.lock CHANGED
@@ -3,12 +3,12 @@ PATH
3
3
  specs:
4
4
  sorbet-cfg (0.1.0)
5
5
  sorbet
6
+ sorbet-runtime
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
11
  diff-lcs (1.3)
11
- parslet (1.8.2)
12
12
  rake (10.5.0)
13
13
  rspec (3.9.0)
14
14
  rspec-core (~> 3.9.0)
@@ -23,21 +23,19 @@ GEM
23
23
  diff-lcs (>= 1.2.0, < 2.0)
24
24
  rspec-support (~> 3.9.0)
25
25
  rspec-support (3.9.0)
26
- sorbet (0.4.4997)
27
- sorbet-static (= 0.4.4997)
28
- sorbet-runtime (0.4.5005)
29
- sorbet-static (0.4.4997-universal-darwin-14)
26
+ sorbet (0.4.5036)
27
+ sorbet-static (= 0.4.5036)
28
+ sorbet-runtime (0.4.5036)
29
+ sorbet-static (0.4.5036-universal-darwin-14)
30
30
 
31
31
  PLATFORMS
32
32
  ruby
33
33
 
34
34
  DEPENDENCIES
35
35
  bundler (~> 2.0)
36
- parslet (~> 1.8)
37
36
  rake (~> 10.0)
38
- rspec (~> 3.9)
37
+ rspec
39
38
  sorbet-cfg!
40
- sorbet-runtime (~> 0.4.5005)
41
39
 
42
40
  BUNDLED WITH
43
41
  2.0.2
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Sorbet::Cfg
1
+ # sorbet-cfg
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sorbet/cfg`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Powerful semantic analysis using Sorbet's CFGs
6
4
 
7
5
  ## Installation
8
6
 
@@ -20,16 +18,6 @@ Or install it yourself as:
20
18
 
21
19
  $ gem install sorbet-cfg
22
20
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
21
  ## Contributing
34
22
 
35
23
  Bug reports and pull requests are welcome on GitHub at https://github.com/AaronC81/sorbet-cfg.
data/sorbet-cfg.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "sorbet-cfg"
6
- spec.version = "0.1.0"
6
+ spec.version = "0.1.1"
7
7
  spec.authors = ["Aaron Christiansen"]
8
8
  spec.email = ["aaronc20000@gmail.com"]
9
9
 
@@ -25,7 +25,9 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
 
27
27
  spec.add_dependency "sorbet"
28
+ spec.add_dependency "sorbet-runtime"
28
29
 
29
30
  spec.add_development_dependency "bundler", "~> 2.0"
30
31
  spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "rspec"
31
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-cfg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Christiansen
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sorbet-runtime
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +66,20 @@ dependencies:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
68
  version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  description:
56
84
  email:
57
85
  - aaronc20000@gmail.com
@@ -68,7 +96,6 @@ files:
68
96
  - Rakefile
69
97
  - lib/sorbet-cfg.rb
70
98
  - lib/sorbet-cfg/loader.rb
71
- - lib/sorbet-cfg/raw_parser.rb
72
99
  - lib/sorbet-cfg/tree/cfg.rb
73
100
  - lib/sorbet-cfg/tree/loc.rb
74
101
  - lib/sorbet-cfg/tree/type.rb
@@ -1,37 +0,0 @@
1
- # typed: ignore
2
- require 'parslet'
3
-
4
- module SorbetCFG
5
- class RawParser < Parslet::Parser
6
- # As far as I can tell, it's OK to just shotgun most operators, but < and >
7
- # need special care because they delimit #sorbet_name
8
- # There's probably some absolutely horrendous stuff that this accepts, but
9
- # if that sort of stuff occurs in a CFG, we have bigger problems
10
- rule(:name) { match('[A-Za-z_0-9=\-|&.!~?]').repeat(1) |
11
- (str('<') >> name >> str('>') | # Matches <=> too!
12
- str('>') | str('<') | str('<=') | str('>=')) }
13
-
14
- rule(:space) { match('\s').repeat(1) }
15
- rule(:space?) { space.maybe }
16
-
17
- rule(:langle) { space? >> match('<') >> space? }
18
- rule(:rangle) { space? >> match('>') >> space? }
19
-
20
- rule(:lbrace) { space? >> match('{') >> space? }
21
- rule(:rbrace) { space? >> match('}') >> space? }
22
-
23
- rule(:sorbet_name) { langle >>
24
- match('[A-Z]').repeat(1).as(:kind) >>
25
- space? >>
26
- name.as(:value) >>
27
- rangle }
28
-
29
- rule(:local_var) { sorbet_name.as(:name) >>
30
- str('$') >>
31
- match('[0-9]').repeat(1).as(:unique) >>
32
- space? }
33
-
34
- rule(:node) { identifier.as(:type) >> lbrace >> rbrace }
35
- root(:node)
36
- end
37
- end