Skip to content

Commit 663b9c9

Browse files
committed
Rename to parse tree
1 parent 9d2500d commit 663b9c9

File tree

12 files changed

+36
-35
lines changed

12 files changed

+36
-35
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
1212

1313
- 🎉 Initial release! 🎉
1414

15-
[unreleased]: https://github.com/kddeisz/template/compare/v0.1.0...HEAD
16-
[0.1.0]: https://github.com/kddeisz/template/compare/39c5a7...v0.1.0
15+
[unreleased]: https://github.com/kddeisz/parse_tree/compare/v0.1.0...HEAD
16+
[0.1.0]: https://github.com/kddeisz/parse_tree/compare/39c5a7...v0.1.0

Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
PATH
22
remote: .
33
specs:
4-
template (0.1.0)
4+
parse_tree (0.1.0)
55

66
GEM
77
remote: https://rubygems.org/
88
specs:
9-
docile (1.3.5)
9+
docile (1.4.0)
1010
minitest (5.14.4)
1111
rake (13.0.6)
1212
simplecov (0.21.2)
1313
docile (~> 1.1)
1414
simplecov-html (~> 0.11)
1515
simplecov_json_formatter (~> 0.1)
1616
simplecov-html (0.12.3)
17-
simplecov_json_formatter (0.1.2)
17+
simplecov_json_formatter (0.1.3)
1818

1919
PLATFORMS
20-
ruby
20+
x86_64-darwin-19
2121

2222
DEPENDENCIES
2323
bundler
2424
minitest
25+
parse_tree!
2526
rake
2627
simplecov
27-
template!
2828

2929
BUNDLED WITH
30-
2.2.3
30+
2.2.15

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Template
22

3-
[![Build Status](https://github.com/kddnewton/ripper-parse_tree/workflows/Main/badge.svg)](https://github.com/kddnewton/ripper-parse_tree/actions)
4-
[![Gem Version](https://img.shields.io/gem/v/ripper-parse_tree.svg)](https://rubygems.org/gems/ripper-parse_tree)
3+
[![Build Status](https://github.com/kddnewton/parse_tree/workflows/Main/badge.svg)](https://github.com/kddnewton/parse_tree/actions)
4+
[![Gem Version](https://img.shields.io/gem/v/parse_tree.svg)](https://rubygems.org/gems/parse_tree)
55

66
## Installation
77

88
Add this line to your application's Gemfile:
99

1010
```ruby
11-
gem 'ripper-parse_tree'
11+
gem 'parse_tree'
1212
```
1313

1414
And then execute:
@@ -17,7 +17,7 @@ And then execute:
1717

1818
Or install it yourself as:
1919

20-
$ gem install ripper-parse_tree
20+
$ gem install parse_tree
2121

2222
## Usage
2323

@@ -29,12 +29,12 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
2929

3030
## Contributing
3131

32-
Bug reports and pull requests are welcome on GitHub at https://github.com/kddeisz/ripper-parse_tree. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/kddnewton/ripper-parse_tree/blob/main/CODE_OF_CONDUCT.md).
32+
Bug reports and pull requests are welcome on GitHub at https://github.com/kddeisz/parse_tree. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/kddnewton/parse_tree/blob/main/CODE_OF_CONDUCT.md).
3333

3434
## License
3535

3636
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
3737

3838
## Code of Conduct
3939

40-
Everyone interacting in the Template project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kddeisz/ripper-parse_tree/blob/main/CODE_OF_CONDUCT.md).
40+
Everyone interacting in the Template project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kddnewton/parse_tree/blob/main/CODE_OF_CONDUCT.md).

bin/console

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# frozen_string_literal: true
33

44
require 'bundler/setup'
5-
require 'ripper/parse_tree'
5+
require 'parse_tree'
66

77
require 'irb'
88
IRB.start(__FILE__)

lib/ripper/parse_tree.rb renamed to lib/parse_tree.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'ripper'
44

5-
class Ripper::ParseTree < Ripper
5+
class ParseTree < Ripper
66
# Represents a line in the source. If this class is being used, it means that
77
# every character in the string is 1 byte in length, so we can just return the
88
# start of the line + the index.
@@ -92,8 +92,8 @@ def initialize(error, lineno, column)
9292
# array and attach them to themselves.
9393
attr_accessor :comments
9494

95-
def initialize(source, *)
96-
super
95+
def initialize(source)
96+
super(source)
9797

9898
# We keep the source around so that we can refer back to it when we're
9999
# generating the AST. Sometimes it's easier to just reference the source
@@ -7334,7 +7334,7 @@ def on_stmts_add(statements, statement)
73347334
# propagate that onto void_stmt nodes inside the stmts in order to make sure
73357335
# all comments get printed appropriately.
73367336
class Statements
7337-
# [Ripper::ParseTree] the parser that created this node
7337+
# [ParseTree] the parser that created this node
73387338
attr_reader :parser
73397339

73407340
# [Array[untyped]] the list of expressions contained within this node

lib/parse_tree/version.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
require 'ripper'
4+
5+
class ParseTree < Ripper
6+
VERSION = '0.1.0'
7+
end

lib/ripper/parse_tree/version.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

ripper-parse_tree.gemspec renamed to parse_tree.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# frozen_string_literal: true
22

3-
require_relative 'lib/ripper/parse_tree/version'
3+
require_relative 'lib/parse_tree/version'
44

55
Gem::Specification.new do |spec|
6-
spec.name = 'template'
7-
spec.version = Ripper::ParseTree::VERSION
6+
spec.name = 'parse_tree'
7+
spec.version = ParseTree::VERSION
88
spec.authors = ['Kevin Newton']
99
spec.email = ['kddnewton@gmail.com']
1010

1111
spec.summary = 'A parser based on ripper'
12-
spec.homepage = 'https://github.com/kddnewton/ripper-parse_tree'
12+
spec.homepage = 'https://github.com/kddnewton/parse_tree'
1313
spec.license = 'MIT'
1414

1515
spec.files = Dir.chdir(__dir__) do

test/fixtures/alias.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%
12
alias foo bar
23
%
34
alias << push

test/ripper/parse_tree/alias_test.rb renamed to test/parse_tree/alias_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'test_helper'
44

5-
class Ripper::ParseTree < Ripper
5+
class ParseTree < Ripper
66
class AliasTest < Minitest::Test
77
def test_alias
88
assert_node(Alias, 'alias foo bar')

0 commit comments

Comments
 (0)