@@ -28,6 +28,13 @@ def lex(string, code, options) # :nodoc:
2828 end
2929 end
3030
31+ def parse_lex ( string , code , options ) # :nodoc:
32+ with_buffer do |buffer |
33+ parse_lex_only ( buffer , string , options )
34+ Serialize . load_parse_lex ( code , buffer . read , options . fetch ( :freeze , false ) )
35+ end
36+ end
37+
3138 # Return the value that should be dumped for the command_line option.
3239 def dump_options_command_line ( options )
3340 command_line = options . fetch ( :command_line , "" )
@@ -202,15 +209,15 @@ def parse_only(buffer, string, options) # :nodoc:
202209 raise NotImplementedError
203210 end
204211
205- def parse_stream ( buffer , callback , eof_callback , options , source ) # :nodoc:
212+ def parse_lex_only ( buffer , string , options ) # :nodoc:
206213 raise NotImplementedError
207214 end
208215
209- def parse_comments ( string , code , options ) # :nodoc:
216+ def parse_stream ( buffer , callback , eof_callback , options , source ) # :nodoc:
210217 raise NotImplementedError
211218 end
212219
213- def parse_lex ( string , code , options ) # :nodoc:
220+ def parse_comments ( string , code , options ) # :nodoc:
214221 raise NotImplementedError
215222 end
216223
0 commit comments