Class: RubyLexer::OperatorToken
- Defined in:
- lib/rubylexer/token.rb
Overview
Instance Attribute Summary collapse
- #as ⇒ Object
-
#unary ⇒ Object
(also: #prefix?)
Returns the value of attribute unary.
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
#as ⇒ Object
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 |
#unary ⇒ Object 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
115 |
# File 'lib/rubylexer/token.rb', line 115 def infix?; !prefix? end |