Class: RubyLexer::NewlineToken

Inherits:
Token
  • Object
show all
Defined in:
lib/rubylexer/token.rb

Overview


Instance Attribute Summary

Attributes inherited from Token

#allow_ooo_offset, #endline, #ident, #offset, #tag

Instance Method Summary collapse

Methods inherited from Token

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

Constructor Details

#initialize(nlstr = "\n", offset = nil) ⇒ NewlineToken

Returns a new instance of NewlineToken.



263
264
265
266
# File 'lib/rubylexer/token.rb', line 263

def initialize(nlstr="\n",offset=nil)
  super(nlstr,offset)
  #@char=''
end

Instance Method Details

#asObject

@char=”



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

def as; ';' end

#linecountObject



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

def linecount; 1 end

#startlineObject



271
272
273
# File 'lib/rubylexer/token.rb', line 271

def startline
  @endline-1
end

#startline=(bogus) ⇒ Object



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

def startline=bogus; end