Skip to content

Commit 9883215

Browse files
authored
Merge pull request #92 from tagliala/chore/fix-typos
Fix typos
2 parents 2d196c1 + 316bf15 commit 9883215

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

lib/regexp_parser/expression/classes/keep.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Regexp::Expression
22
module Keep
3-
# TOOD: in regexp_parser v3.0.0 this should possibly be a Subexpression
3+
# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression
44
# that contains all expressions to its left.
55
class Mark < Regexp::Expression::Base; end
66
end

lib/regexp_parser/parser.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,18 +575,18 @@ def active_opts
575575
options_stack.last
576576
end
577577

578-
# Assigns referenced expressions to refering expressions, e.g. if there is
578+
# Assigns referenced expressions to referring expressions, e.g. if there is
579579
# an instance of Backreference::Number, its #referenced_expression is set to
580580
# the instance of Group::Capture that it refers to via its number.
581581
def assign_referenced_expressions
582-
# find all referencable and refering expressions
582+
# find all referenceable and referring expressions
583583
targets = { 0 => root }
584584
referrers = []
585585
root.each_expression do |exp|
586586
exp.is_a?(Group::Capture) && targets[exp.identifier] = exp
587587
referrers << exp if exp.referential?
588588
end
589-
# assign reference expression to refering expressions
589+
# assign reference expression to referring expressions
590590
# (in a second iteration because there might be forward references)
591591
referrers.each do |exp|
592592
exp.referenced_expression = targets[exp.reference] ||

spec/parser/errors_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
end
1111

1212
RSpec.shared_examples 'UnknownTokenError' do |type|
13-
it "raises for unkown tokens of type #{type}" do
13+
it "raises for unknown tokens of type #{type}" do
1414
expect { parser.send(:parse_token, Regexp::Token.new(type, :foo)) }
1515
.to raise_error(Regexp::Parser::UnknownTokenError)
1616
end

spec/parser/escapes_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
expect { exp.codepoint }.to raise_error(/#codepoints/)
4848
end
4949

50-
# Meta/control espaces
50+
# Meta/control escapes
5151
#
5252
# After the following fix in Ruby 3.1, a Regexp#source containing meta/control
5353
# escapes can only be set with the Regexp::new constructor.

spec/scanner/escapes_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
include_examples 'scan', /a\
5656
b/x, 0 => [:literal, :literal, 'ab', 0, 2]
5757

58-
# Meta/control espaces
58+
# Meta/control escapes
5959
#
6060
# After the following fix in Ruby 3.1, a Regexp#source containing meta/control
6161
# escapes can only be set with the Regexp::new constructor.

spec/scanner/refcalls_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
# NOTE: only \g supports forward-looking references using '+', e.g. \g<+1>
1010
# refers to the next group, but \k<+1> refers to a group named '+1'.
11-
# Inversely, only \k supports addition or substraction of a recursion level.
11+
# Inversely, only \k supports addition or subtraction of a recursion level.
1212
# E.g. \k<x+0> refers to a group named 'x' at the current recursion level,
1313
# but \g<x+0> refers to a a group named 'x+0'.
1414
#

0 commit comments

Comments
 (0)