js_regex 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ class JsRegex
2
+ #
3
+ module Converter
4
+ require_relative 'set_converter'
5
+ #
6
+ # Simple reroute to SetConverter.
7
+ #
8
+ class SubsetConverter < JsRegex::Converter::SetConverter; end
9
+ end
10
+ end
@@ -0,0 +1,26 @@
1
+ class JsRegex
2
+ #
3
+ module Converter
4
+ require_relative 'base'
5
+ #
6
+ # Template class implementation.
7
+ #
8
+ class TypeConverter < JsRegex::Converter::Base
9
+ HEX_EXPANSION = '[A-Fa-f0-9]'
10
+ NONHEX_EXPANSION = '[^A-Fa-f0-9]'
11
+
12
+ private
13
+
14
+ def convert_data
15
+ case subtype
16
+ when :hex then HEX_EXPANSION
17
+ when :nonhex then NONHEX_EXPANSION
18
+ when :any, :digit, :nondigit, :word, :nonword, :space, :nonspace
19
+ pass_through
20
+ else
21
+ warn_of_unsupported_feature
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,16 @@
1
+ class JsRegex
2
+ #
3
+ module Converter
4
+ require_relative 'base'
5
+ #
6
+ # Template class implementation.
7
+ #
8
+ class UnsupportedTokenConverter < JsRegex::Converter::Base
9
+ private
10
+
11
+ def convert_data
12
+ warn_of_unsupported_feature
13
+ end
14
+ end
15
+ end
16
+ end