ruby-next-parser 3.1.1.0 → 3.1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -96,7 +96,7 @@ class Next
96
96
  attr_accessor :static_env
97
97
  attr_accessor :force_utf32
98
98
 
99
- attr_accessor :cond, :cmdarg, :in_kwarg, :context, :command_start
99
+ attr_accessor :cond, :cmdarg, :context, :command_start
100
100
 
101
101
  attr_accessor :tokens, :comments
102
102
 
@@ -1443,15 +1443,15 @@ class Next
1443
1443
  => { emit(:tLABEL, tok(@ts, @te - 2), @ts, @te - 1)
1444
1444
  fhold; fnext expr_labelarg; fbreak; };
1445
1445
 
1446
- '...' c_nl
1446
+ '...'
1447
1447
  => {
1448
- if @version >= 31
1449
- emit(:tBDOT3, '...'.freeze, @ts, @te - 1)
1450
- emit(:tNL, "\n".freeze, @te - 1, @te)
1448
+ if @version >= 31 && @context.in_argdef
1449
+ emit(:tBDOT3, '...'.freeze)
1450
+ # emit(:tNL, "\n".freeze, @te - 1, @te)
1451
1451
  fnext expr_end; fbreak;
1452
1452
  else
1453
- p -= 4;
1454
- fhold; fgoto expr_end;
1453
+ p -= 3;
1454
+ fgoto expr_end;
1455
1455
  end
1456
1456
  };
1457
1457
 
@@ -2077,7 +2077,7 @@ class Next
2077
2077
  else
2078
2078
  emit(:tBDOT3, '...'.freeze, @ts, dots_te)
2079
2079
 
2080
- if @version >= 31 && followed_by_nl && @context.in_def_open_args?
2080
+ if @version >= 31 && followed_by_nl && @context.in_argdef
2081
2081
  emit(:tNL, @te - 1, @te)
2082
2082
  nl_emitted = true
2083
2083
  end
@@ -2162,7 +2162,7 @@ class Next
2162
2162
 
2163
2163
  w_newline
2164
2164
  => {
2165
- if @in_kwarg
2165
+ if @context.in_kwarg
2166
2166
  fhold; fgoto expr_end;
2167
2167
  else
2168
2168
  fgoto line_begin;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parser
4
- NEXT_VERSION = "3.1.1.0"
4
+ NEXT_VERSION = "3.1.1.1"
5
5
  end