31
31
32
32
import org .jcodings .Encoding ;
33
33
import org .jruby .lexer .LexerSource ;
34
- import org .jruby .parser .RubyParser ;
35
34
import org .jruby .util .ByteList ;
36
35
37
36
import static org .jruby .lexer .LexingCommon .*;
@@ -80,7 +79,7 @@ protected int error(RipperLexer lexer, int len, ByteList str, ByteList eos) {
80
79
lexer .compile_error ("can't find string \" " + eos .toString () + "\" anywhere before EOF" );
81
80
82
81
if (lexer .delayed == null ) {
83
- lexer .dispatchScanEvent (RubyParser .tSTRING_CONTENT );
82
+ lexer .dispatchScanEvent (RipperParser .tSTRING_CONTENT );
84
83
} else {
85
84
if (str != null ) {
86
85
lexer .delayed .append (str );
@@ -90,7 +89,7 @@ protected int error(RipperLexer lexer, int len, ByteList str, ByteList eos) {
90
89
lexer .delayed .append (lexer .lexb .makeShared (lexer .tokp , len ));
91
90
}
92
91
}
93
- lexer .dispatchDelayedToken (RubyParser .tSTRING_CONTENT );
92
+ lexer .dispatchDelayedToken (RipperParser .tSTRING_CONTENT );
94
93
}
95
94
lexer .lex_goto_eol ();
96
95
@@ -101,7 +100,7 @@ protected int restore(RipperLexer lexer) {
101
100
lexer .heredoc_restore (this );
102
101
lexer .setStrTerm (new StringTerm (flags | STR_FUNC_TERM , 0 , 0 )); // Weird way of ending
103
102
104
- return RubyParser .tSTRING_CONTENT ;
103
+ return RipperParser .tSTRING_CONTENT ;
105
104
}
106
105
107
106
@ Override
@@ -120,7 +119,7 @@ public int parseString(RipperLexer lexer, LexerSource src) throws java.io.IOExce
120
119
lexer .heredoc_restore (this );
121
120
lexer .setStrTerm (null );
122
121
lexer .setState (EXPR_END );
123
- return RubyParser .tSTRING_END ;
122
+ return RipperParser .tSTRING_END ;
124
123
}
125
124
126
125
if ((flags & STR_FUNC_EXPAND ) == 0 ) {
@@ -159,7 +158,7 @@ public int parseString(RipperLexer lexer, LexerSource src) throws java.io.IOExce
159
158
160
159
if (lexer .getHeredocIndent () > 0 ) {
161
160
lexer .setValue (lexer .createStr (str , 0 ));
162
- return RubyParser .tSTRING_CONTENT ;
161
+ return RipperParser .tSTRING_CONTENT ;
163
162
}
164
163
// MRI null checks str in this case but it is unconditionally non-null?
165
164
if (lexer .nextc () == -1 ) return error (lexer , len , null , eos );
@@ -192,15 +191,15 @@ public int parseString(RipperLexer lexer, LexerSource src) throws java.io.IOExce
192
191
if (c != '\n' ) {
193
192
lexer .setValue (lexer .createStr (tok , 0 ));
194
193
lexer .flush_string_content (enc [0 ]);
195
- return RubyParser .tSTRING_CONTENT ;
194
+ return RipperParser .tSTRING_CONTENT ;
196
195
}
197
196
tok .append (lexer .nextc ());
198
197
199
198
if (lexer .getHeredocIndent () > 0 ) {
200
199
lexer .lex_goto_eol ();
201
200
lexer .setValue (lexer .createStr (tok , 0 ));
202
201
lexer .flush_string_content (enc [0 ]);
203
- return RubyParser .tSTRING_CONTENT ;
202
+ return RipperParser .tSTRING_CONTENT ;
204
203
}
205
204
206
205
if ((c = lexer .nextc ()) == EOF ) return error (lexer , len , str , eos );
@@ -211,6 +210,6 @@ public int parseString(RipperLexer lexer, LexerSource src) throws java.io.IOExce
211
210
lexer .pushback (c );
212
211
lexer .setValue (lexer .createStr (str , 0 ));
213
212
lexer .flush_string_content (lexer .getEncoding ());
214
- return RubyParser .tSTRING_CONTENT ;
213
+ return RipperParser .tSTRING_CONTENT ;
215
214
}
216
215
}
0 commit comments