Class: RubyLexer::HereBodyToken
- Inherits:
-
IgnoreToken
- Object
- Token
- IgnoreToken
- RubyLexer::HereBodyToken
- Defined in:
- lib/rubylexer/token.rb,
lib/rubylexer/tokenprinter.rb
Overview
experimental
Direct Known Subclasses
Instance Attribute Summary collapse
-
#close ⇒ Object
attr_accessor :ender.
-
#headtok ⇒ Object
readonly
Returns the value of attribute headtok.
-
#linecount ⇒ Object
readonly
num lines here body spans (including terminator).
-
#open ⇒ Object
attr_accessor :ender.
Attributes inherited from Token
#allow_ooo_offset, #as, #ident, #offset, #tag
Instance Method Summary collapse
-
#initialize(headtok, linecount) ⇒ HereBodyToken
constructor
A new instance of HereBodyToken.
- #line ⇒ Object
- #to_s ⇒ Object
- #ws_munge(tp) ⇒ Object
Methods inherited from Token
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
#close ⇒ Object
attr_accessor :ender
598 599 600 |
# File 'lib/rubylexer/token.rb', line 598 def close @close end |
#headtok ⇒ Object (readonly)
Returns the value of attribute headtok.
614 615 616 |
# File 'lib/rubylexer/token.rb', line 614 def headtok @headtok end |
#linecount ⇒ Object (readonly)
num lines here body spans (including terminator)
615 616 617 |
# File 'lib/rubylexer/token.rb', line 615 def linecount @linecount end |
#open ⇒ Object
attr_accessor :ender
598 599 600 |
# File 'lib/rubylexer/token.rb', line 598 def open @open end |
Instance Method Details
#line ⇒ Object
606 607 608 |
# File 'lib/rubylexer/token.rb', line 606 def line @ident.line end |
#to_s ⇒ Object
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 |