Merge pull request #634 from mbj/feature/hex_type_node
Add regexp support for /\h/
This commit is contained in:
commit
79c6704d6e
2 changed files with 6 additions and 0 deletions
|
@ -70,6 +70,7 @@ module Mutant
|
|||
[:regexp_script_hiragana_property, [:property, :script_hiragana, '\p{Hiragana}'], ::Regexp::Expression::UnicodeProperty::Script],
|
||||
[:regexp_script_katakana_property, [:property, :script_katakana, '\p{Katakana}'], ::Regexp::Expression::UnicodeProperty::Script],
|
||||
[:regexp_letter_any_property, [:property, :letter_any, '\p{L}'], ::Regexp::Expression::UnicodeProperty::Letter::Any],
|
||||
[:regexp_hex_type, [:type, :hex, '\h'], ::Regexp::Expression::CharacterType::Hex],
|
||||
[:regexp_digit_type, [:type, :digit, '\d'], ::Regexp::Expression::CharacterType::Digit],
|
||||
[:regexp_space_type, [:type, :space, '\s'], ::Regexp::Expression::CharacterType::Space],
|
||||
[:regexp_word_type, [:type, :word, '\w'], ::Regexp::Expression::CharacterType::Word],
|
||||
|
|
|
@ -611,6 +611,11 @@ RegexpSpec.expect_mapping(/\w/, :regexp_word_type) do
|
|||
s(:regexp_word_type))
|
||||
end
|
||||
|
||||
RegexpSpec.expect_mapping(/\h/, :regexp_hex_type) do
|
||||
s(:regexp_root_expression,
|
||||
s(:regexp_hex_type))
|
||||
end
|
||||
|
||||
RegexpSpec.expect_mapping(/\*/, :regexp_zero_or_more_escape) do
|
||||
s(:regexp_root_expression,
|
||||
s(:regexp_zero_or_more_escape))
|
||||
|
|
Loading…
Reference in a new issue