Class: RubyLexer::OperatorToken

Inherits:
WToken show all
Defined in:
lib/rubylexer/token.rb

Overview


Instance Attribute Summary collapse

Attributes inherited from Token

#allow_ooo_offset, #ident, #offset, #tag

Instance Method Summary collapse

Methods inherited from WToken

#===

Methods inherited from Token

#error, #has_no_block?, #initialize, #to_s, #ws_munge

Constructor Details

This class inherits a constructor from RubyLexer::Token

Instance Attribute Details

#asObject



117
118
119
120
121
122
# File 'lib/rubylexer/token.rb', line 117

def as
  return @as if defined? @as
  if tag and ident[/^[,*&]$/]
    tag.to_s+ident
  end
end

#unaryObject Also known as: prefix?

Returns the value of attribute unary.



112
113
114
# File 'lib/rubylexer/token.rb', line 112

def unary
  @unary
end

Instance Method Details

#infix?Boolean

Returns:

  • (Boolean)


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

def infix?; !prefix? end