Skip to content

Commit a966888

Browse files
headiusmatzbot
authored andcommitted
[ruby/prism] Use common method to construct Location here
ruby/prism@588f41ed6b
1 parent d95afb7 commit a966888

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

prism/templates/lib/prism/serialize.rb.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,10 @@ module Prism
437437
tokens = [] #: Array[[Token, Integer]]
438438

439439
while (type = TOKEN_TYPES.fetch(load_varuint))
440-
start = load_varuint
441-
length = load_varuint
440+
location = load_location_object(false)
441+
442442
lex_state = load_varuint
443443

444-
location = Location.new(@source, start, length)
445444
token = Token.new(@source, type, location.slice, location)
446445

447446
tokens << [token, lex_state]

0 commit comments

Comments
 (0)