Sha256: ae9e66d3bcaa1c0a8e7e4da2200ad6ff87a6531157135db3fce2a6a56b4844b8

Contents?: true

Size: 642 Bytes

Versions: 4

Compression:

Stored size: 642 Bytes

Contents

module Yoda
  module AST
    class CommentBlock
      class TextPart < BasePart
        # @return [CommentBlock]
        attr_reader :comment_block

        # @return [Parsing::CommentTokenizer::Text]
        attr_reader :token

        # @param comment_block [CommentBlock]
        # @param token [Parsing::CommentTokenizer::Text]
        def initialize(comment_block:, token:)
          @comment_block = comment_block
          @token = token
        end

        def begin_index
          token.content.offset
        end

        def end_index
          token.content.offset + token.content.length
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yoda-language-server-0.10.1 lib/yoda/ast/comment_block/text_part.rb
yoda-language-server-0.10.0 lib/yoda/ast/comment_block/text_part.rb
yoda-language-server-0.9.0 lib/yoda/ast/comment_block/text_part.rb
yoda-language-server-0.8.0 lib/yoda/ast/comment_block/text_part.rb