Class: RubyLexer::ZwToken

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

Overview


Instance Attribute Summary

Attributes inherited from Token

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

Instance Method Summary collapse

Methods inherited from Token

#error, #has_no_block?, #to_s

Constructor Details

#initialize(offset) ⇒ ZwToken

Returns a new instance of ZwToken.



495
496
497
# File 'lib/rubylexer/token.rb', line 495

def initialize(offset)
  super('',offset)
end

Instance Method Details

#explicit_formObject



498
499
500
# File 'lib/rubylexer/token.rb', line 498

def explicit_form
  abstract
end

#explicit_form_allObject



501
# File 'lib/rubylexer/token.rb', line 501

def explicit_form_all; explicit_form end

#ws_munge(tp) ⇒ Object



88
89
90
91
92
93
94
95
# File 'lib/rubylexer/tokenprinter.rb', line 88

def ws_munge(tp)
   case tp.showzw 
   when 2; explicit_form_all
   when 1; explicit_form
   when 0; nil
   else raise 'unknown showzw'
   end
end