lib/parser/source/comment.rb in parser-2.0.0.pre3 vs lib/parser/source/comment.rb in parser-2.0.0.pre4

- old
+ new

@@ -6,11 +6,11 @@ # # @!attribute [r] text # @return String # # @!attribute [r] location - # @return Parser::Source::Range + # @return Parser::Source::Map class Comment attr_reader :text attr_reader :location alias_method :loc, :location @@ -21,13 +21,13 @@ associator = Associator.new(comments, ast) associator.associate end ## - # @param [Parser::Source::Range] location - def initialize(location) - @location = location - @text = location.source.freeze + # @param [Parser::Source::Range] range + def initialize(range) + @location = Parser::Source::Map.new(range) + @text = range.source.freeze freeze end ##