lib/prism/serialize.rb in prism-0.26.0 vs lib/prism/serialize.rb in prism-0.27.0

- old
+ new

@@ -16,11 +16,11 @@ # strings. MAJOR_VERSION = 0 # The minor version of prism that we are expecting to find in the serialized # strings. - MINOR_VERSION = 26 + MINOR_VERSION = 27 # The patch version of prism that we are expecting to find in the serialized # strings. PATCH_VERSION = 0 @@ -258,10 +258,12 @@ :instance_variable_bare, :invalid_block_exit, :invalid_character, :invalid_encoding_magic_comment, :invalid_float_exponent, + :invalid_local_variable_read, + :invalid_local_variable_write, :invalid_multibyte_char, :invalid_multibyte_character, :invalid_multibyte_escape, :invalid_number_binary, :invalid_number_decimal, @@ -330,10 +332,11 @@ :pattern_expression_after_range, :pattern_expression_after_rest, :pattern_hash_key, :pattern_hash_key_duplicate, :pattern_hash_key_label, + :pattern_hash_key_locals, :pattern_ident_after_hrocket, :pattern_label_after_comma, :pattern_rest, :pattern_term_brace, :pattern_term_bracket, @@ -424,11 +427,11 @@ while type = TOKEN_TYPES.fetch(load_varuint) start = load_varuint length = load_varuint lex_state = load_varuint location = Location.new(@source, start, length) - tokens << [Prism::Token.new(source, type, location.slice, location), lex_state] + tokens << [Token.new(source, type, location.slice, location), lex_state] end tokens end @@ -439,11 +442,11 @@ load_line_offsets comments, magic_comments, data_loc, errors, warnings = load_metadata tokens.each { |token,| token.value.force_encoding(encoding) } raise "Expected to consume all bytes while deserializing" unless @io.eof? - Prism::ParseResult.new(tokens, comments, magic_comments, data_loc, errors, warnings, @source) + LexResult.new(tokens, comments, magic_comments, data_loc, errors, warnings, @source) end def load_nodes load_header load_encoding @@ -458,10 +461,10 @@ [load_node, comments, magic_comments, data_loc, errors, warnings] end def load_result node, comments, magic_comments, data_loc, errors, warnings = load_nodes - Prism::ParseResult.new(node, comments, magic_comments, data_loc, errors, warnings, @source) + ParseResult.new(node, comments, magic_comments, data_loc, errors, warnings, @source) end private # variable-length integer using https://en.wikipedia.org/wiki/LEB128