Class: RubyLexer::HereBodyToken

Inherits:
IgnoreToken show all
Defined in:
lib/rubylexer/token.rb,
lib/rubylexer/tokenprinter.rb

Overview

experimental

Direct Known Subclasses

OutlinedHereBodyToken

Instance Attribute Summary collapse

Attributes inherited from Token

#allow_ooo_offset, #as, #ident, #offset, #tag

Instance Method Summary collapse

Methods inherited from Token

#error, #has_no_block?

Constructor Details

#initialize(headtok, linecount) ⇒ HereBodyToken

Returns a new instance of HereBodyToken.



599
600
601
602
603
604
# File 'lib/rubylexer/token.rb', line 599

def initialize(headtok,linecount)
  assert HerePlaceholderToken===headtok
  super(headtok.string,headtok.string.offset)
  @headtok=headtok
  @linecount=linecount
end

Instance Attribute Details

#closeObject

attr_accessor :ender



598
599
600
# File 'lib/rubylexer/token.rb', line 598

def close
  @close
end

#headtokObject (readonly)

Returns the value of attribute headtok.



614
615
616
# File 'lib/rubylexer/token.rb', line 614

def headtok
  @headtok
end

#linecountObject (readonly)

num lines here body spans (including terminator)



615
616
617
# File 'lib/rubylexer/token.rb', line 615

def linecount
  @linecount
end

#openObject

attr_accessor :ender



598
599
600
# File 'lib/rubylexer/token.rb', line 598

def open
  @open
end

Instance Method Details

#lineObject



606
607
608
# File 'lib/rubylexer/token.rb', line 606

def line
  @ident.line
end

#to_sObject



610
611
612
# File 'lib/rubylexer/token.rb', line 610

def to_s
  @ident.to_s
end

#ws_munge(tp) ⇒ Object



82
83
84
# File 'lib/rubylexer/tokenprinter.rb', line 82

def ws_munge(tp) #experimental
  nil
end