regexp_parser 2.6.2 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -1
- data/lib/regexp_parser/expression/classes/backreference.rb +4 -0
- data/lib/regexp_parser/expression/classes/conditional.rb +8 -0
- data/lib/regexp_parser/expression/methods/traverse.rb +6 -3
- data/lib/regexp_parser/expression/sequence.rb +0 -1
- data/lib/regexp_parser/expression/shared.rb +5 -1
- data/lib/regexp_parser/expression/subexpression.rb +4 -1
- data/lib/regexp_parser/lexer.rb +61 -29
- data/lib/regexp_parser/parser.rb +12 -11
- data/lib/regexp_parser/scanner/property.rl +1 -1
- data/lib/regexp_parser/scanner/scanner.rl +55 -40
- data/lib/regexp_parser/scanner.rb +344 -298
- data/lib/regexp_parser/syntax/version_lookup.rb +0 -8
- data/lib/regexp_parser/syntax/versions.rb +2 -0
- data/lib/regexp_parser/version.rb +1 -1
- metadata +3 -3
@@ -37,7 +37,6 @@ module Regexp::Syntax
|
|
37
37
|
return Regexp::Syntax::Any if ['*', 'any'].include?(version.to_s)
|
38
38
|
|
39
39
|
version =~ VERSION_REGEXP || raise(InvalidVersionNameError, version)
|
40
|
-
warn_if_future_version(version)
|
41
40
|
version_const_name = "V#{version.to_s.scan(/\d+/).join('_')}"
|
42
41
|
const_get(version_const_name) || raise(UnknownSyntaxNameError, version)
|
43
42
|
end
|
@@ -63,11 +62,4 @@ module Regexp::Syntax
|
|
63
62
|
# add .99 to treat versions without a patch value as latest patch version
|
64
63
|
Gem::Version.new((name.to_s.scan(/\d+/) << 99).join('.'))
|
65
64
|
end
|
66
|
-
|
67
|
-
def warn_if_future_version(const_name)
|
68
|
-
return if comparable(const_name) < comparable('4.0.0')
|
69
|
-
|
70
|
-
warn('This library has only been tested up to Ruby 3.x, '\
|
71
|
-
"but you are running with #{const_name}")
|
72
|
-
end
|
73
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regexp_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ammar Ali
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A library for tokenizing, lexing, and parsing Ruby regular expressions.
|
14
14
|
email:
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
rubygems_version: 3.
|
128
|
+
rubygems_version: 3.4.1
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Scanner, lexer, parser for ruby's regular expressions
|