File tree Expand file tree Collapse file tree 5 files changed +19
-13
lines changed Expand file tree Collapse file tree 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
66
77## [ Unreleased]
88
9+ ## [ 2.0.1] - 2022-03-31
10+
11+ ### Changed
12+
13+ - Move the ` SyntaxTree.register_handler ` method to the correct location.
14+
915## [ 2.0.0] - 2022-03-31
1016
1117### Added
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- syntax_tree (2.0.0 )
4+ syntax_tree (2.0.1 )
55
66GEM
77 remote: https://rubygems.org/
Original file line number Diff line number Diff line change 2525end
2626
2727module 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+
2839 # Parses the given source and returns the syntax tree.
2940 def self . parse ( source )
3041 parser = Parser . new ( source )
Original file line number Diff line number Diff line change 22
33module SyntaxTree
44 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-
165 # A utility wrapper around colored strings in the output.
176 class Color
187 attr_reader :value , :code
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module SyntaxTree
4- VERSION = "2.0.0 "
4+ VERSION = "2.0.1 "
55end
You can’t perform that action at this time.
0 commit comments