Class: RubyLexer::ZwToken

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

Overview


Instance Attribute Summary

Attributes inherited from IgnoreToken

#linecount

Attributes inherited from Token

#allow_ooo_offset, #as, #endline, #ident, #offset, #startline, #tag

Instance Method Summary collapse

Methods inherited from Token

#dump, #error, #has_no_block?, #inspect, #linecount, #orig_inspect, #to_s

Constructor Details

#initialize(offset) ⇒ ZwToken

Returns a new instance of ZwToken.



581
582
583
# File 'lib/rubylexer/token.rb', line 581

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

Instance Method Details

#explicit_formObject



584
585
586
# File 'lib/rubylexer/token.rb', line 584

def explicit_form
  abstract
end

#explicit_form_allObject



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

def explicit_form_all; explicit_form end

#ws_munge(tp) ⇒ Object



91
92
93
94
95
96
97
98
# File 'lib/rubylexer/tokenprinter.rb', line 91

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