Project

General

Profile

« Previous | Next » 

Revision d0deec3e

Added by Earlopain (Earlopain _) 6 months ago

[ruby/prism] Fix parser translator tokens for comment-only file

In https://github.com/ruby/prism/pull/3393 I made a mistake.
When there is no previous token, it wraps around to -1. Oops

Additionally, if a comment has no newline then the offset should be kept as is

https://github.com/ruby/prism/commit/3c266f1de4