File tree 5 files changed +19
-13
lines changed
5 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
7
7
## [ Unreleased]
8
8
9
+ ## [ 2.0.1] - 2022-03-31
10
+
11
+ ### Changed
12
+
13
+ - Move the ` SyntaxTree.register_handler ` method to the correct location.
14
+
9
15
## [ 2.0.0] - 2022-03-31
10
16
11
17
### Added
Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- syntax_tree (2.0.0 )
4
+ syntax_tree (2.0.1 )
5
5
6
6
GEM
7
7
remote: https://rubygems.org/
Original file line number Diff line number Diff line change 25
25
end
26
26
27
27
module SyntaxTree
28
+ # This holds references to objects that respond to both #parse and #format
29
+ # so that we can use them in the CLI.
30
+ HANDLERS = { }
31
+ HANDLERS . default = SyntaxTree
32
+
33
+ # This is a hook provided so that plugins can register themselves as the
34
+ # handler for a particular file type.
35
+ def self . register_handler ( extension , handler )
36
+ HANDLERS [ extension ] = handler
37
+ end
38
+
28
39
# Parses the given source and returns the syntax tree.
29
40
def self . parse ( source )
30
41
parser = Parser . new ( source )
Original file line number Diff line number Diff line change 2
2
3
3
module SyntaxTree
4
4
module CLI
5
- # This holds references to objects that respond to both #parse and #format
6
- # so that we can use them in the CLI.
7
- HANDLERS = { }
8
- HANDLERS . default = SyntaxTree
9
-
10
- # This is a hook provided so that plugins can register themselves as the
11
- # handler for a particular file type.
12
- def self . register_handler ( extension , handler )
13
- HANDLERS [ extension ] = handler
14
- end
15
-
16
5
# A utility wrapper around colored strings in the output.
17
6
class Color
18
7
attr_reader :value , :code
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module SyntaxTree
4
- VERSION = "2.0.0 "
4
+ VERSION = "2.0.1 "
5
5
end
You can’t perform that action at this time.
0 commit comments