@@ -513,7 +513,7 @@ def get_included_module_with_optional_parens
513
513
when :on_comment , :on_embdoc then
514
514
@read . pop
515
515
if :on_nl == end_token [ :kind ] and "\n " == tk [ :text ] [ -1 ] and
516
- ( !continue or ( tk [ :state ] & RDoc :: Parser :: RipperStateLex ::EXPR_LABEL ) != 0 ) then
516
+ ( !continue or ( tk [ :state ] & Ripper ::EXPR_LABEL ) != 0 ) then
517
517
break if !continue and nest <= 0
518
518
end
519
519
when :on_comma then
@@ -526,7 +526,7 @@ def get_included_module_with_optional_parens
526
526
nest += 1
527
527
when 'if' , 'unless' , 'while' , 'until' , 'rescue'
528
528
# postfix if/unless/while/until/rescue must be EXPR_LABEL
529
- nest += 1 unless ( tk [ :state ] & RDoc :: Parser :: RipperStateLex ::EXPR_LABEL ) != 0
529
+ nest += 1 unless ( tk [ :state ] & Ripper ::EXPR_LABEL ) != 0
530
530
when 'end'
531
531
nest -= 1
532
532
break if nest == 0
@@ -1041,7 +1041,7 @@ def parse_constant_body container, constant, is_array_or_hash # :nodoc:
1041
1041
elsif ( :on_kw == tk [ :kind ] && 'def' == tk [ :text ] ) then
1042
1042
nest += 1
1043
1043
elsif ( :on_kw == tk [ :kind ] && %w{ do if unless case begin } . include? ( tk [ :text ] ) ) then
1044
- if ( tk [ :state ] & RDoc :: Parser :: RipperStateLex ::EXPR_LABEL ) == 0
1044
+ if ( tk [ :state ] & Ripper ::EXPR_LABEL ) == 0
1045
1045
nest += 1
1046
1046
end
1047
1047
elsif [ :on_rparen , :on_rbrace , :on_rbracket ] . include? ( tk [ :kind ] ) ||
@@ -1662,7 +1662,7 @@ def parse_method_or_yield_parameters(method = nil,
1662
1662
when :on_comment , :on_embdoc then
1663
1663
@read . pop
1664
1664
if :on_nl == end_token [ :kind ] and "\n " == tk [ :text ] [ -1 ] and
1665
- ( !continue or ( tk [ :state ] & RDoc :: Parser :: RipperStateLex ::EXPR_LABEL ) != 0 ) then
1665
+ ( !continue or ( tk [ :state ] & Ripper ::EXPR_LABEL ) != 0 ) then
1666
1666
if method && method . block_params . nil? then
1667
1667
unget_tk tk
1668
1668
read_documentation_modifiers method , modifiers
@@ -1882,7 +1882,7 @@ def parse_statements(container, single = NORMAL, current_method = nil,
1882
1882
end
1883
1883
1884
1884
when 'until' , 'while' then
1885
- if ( tk [ :state ] & RDoc :: Parser :: RipperStateLex ::EXPR_LABEL ) == 0
1885
+ if ( tk [ :state ] & Ripper ::EXPR_LABEL ) == 0
1886
1886
nest += 1
1887
1887
skip_optional_do_after_expression
1888
1888
end
@@ -1898,7 +1898,7 @@ def parse_statements(container, single = NORMAL, current_method = nil,
1898
1898
skip_optional_do_after_expression
1899
1899
1900
1900
when 'case' , 'do' , 'if' , 'unless' , 'begin' then
1901
- if ( tk [ :state ] & RDoc :: Parser :: RipperStateLex ::EXPR_LABEL ) == 0
1901
+ if ( tk [ :state ] & Ripper ::EXPR_LABEL ) == 0
1902
1902
nest += 1
1903
1903
end
1904
1904
0 commit comments