regexp_parser 2.9.1 → 2.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/regexp_parser/expression/classes/keep.rb +1 -1
- data/lib/regexp_parser/parser.rb +3 -3
- data/lib/regexp_parser/version.rb +1 -1
- data/regexp_parser.gemspec +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c88d5bc178e9bf95a8a008d9d5e9d8cf1b4a8bb0d65310901a995daa448a28f4
|
4
|
+
data.tar.gz: 47c1ed4782981f5cc2a0bb7bd8f402e360cd60ebeba33615df0c94dd3842b48c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dc1bf229c259b762ea38f459f70a9a04e5ee08207fbae04bdf9045f9f2b1c0f0b6a716a3e08fda55ca0b769ef55f480f7f0e19f3412175fdc7a475362889ab3
|
7
|
+
data.tar.gz: 5de692c1cce8f2436936752d0cf6c5ea51d84bb9c63110dcc49621a476b47800300911952f4d4a687c81f151886bc5570b14af559d74b5196b63e13c684ab7c5
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Regexp::Expression
|
2
2
|
module Keep
|
3
|
-
#
|
3
|
+
# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression
|
4
4
|
# that contains all expressions to its left.
|
5
5
|
class Mark < Regexp::Expression::Base; end
|
6
6
|
end
|
data/lib/regexp_parser/parser.rb
CHANGED
@@ -575,18 +575,18 @@ class Regexp::Parser
|
|
575
575
|
options_stack.last
|
576
576
|
end
|
577
577
|
|
578
|
-
# Assigns referenced expressions to
|
578
|
+
# Assigns referenced expressions to referring expressions, e.g. if there is
|
579
579
|
# an instance of Backreference::Number, its #referenced_expression is set to
|
580
580
|
# the instance of Group::Capture that it refers to via its number.
|
581
581
|
def assign_referenced_expressions
|
582
|
-
# find all
|
582
|
+
# find all referenceable and referring expressions
|
583
583
|
targets = { 0 => root }
|
584
584
|
referrers = []
|
585
585
|
root.each_expression do |exp|
|
586
586
|
exp.is_a?(Group::Capture) && targets[exp.identifier] = exp
|
587
587
|
referrers << exp if exp.referential?
|
588
588
|
end
|
589
|
-
# assign reference expression to
|
589
|
+
# assign reference expression to referring expressions
|
590
590
|
# (in a second iteration because there might be forward references)
|
591
591
|
referrers.each do |exp|
|
592
592
|
exp.referenced_expression = targets[exp.reference] ||
|
data/regexp_parser.gemspec
CHANGED
@@ -16,6 +16,8 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.metadata['source_code_uri'] = spec.homepage
|
17
17
|
spec.metadata['wiki_uri'] = "#{spec.homepage}/wiki"
|
18
18
|
|
19
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
20
|
+
|
19
21
|
spec.authors = ['Ammar Ali', 'Janosch Müller']
|
20
22
|
spec.email = ['ammarabuali@gmail.com', 'janosch84@gmail.com']
|
21
23
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regexp_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ammar Ali
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A library for tokenizing, lexing, and parsing Ruby regular expressions.
|
15
15
|
email:
|
@@ -115,6 +115,7 @@ metadata:
|
|
115
115
|
homepage_uri: https://github.com/ammar/regexp_parser
|
116
116
|
source_code_uri: https://github.com/ammar/regexp_parser
|
117
117
|
wiki_uri: https://github.com/ammar/regexp_parser/wiki
|
118
|
+
rubygems_mfa_required: 'true'
|
118
119
|
post_install_message:
|
119
120
|
rdoc_options: []
|
120
121
|
require_paths:
|