Class: RubyLexer::KeywordToken
- Defined in:
- lib/rubylexer/token.rb
Overview
Direct Known Subclasses
Instance Attribute Summary collapse
-
#grouping ⇒ Object
Returns the value of attribute grouping.
-
#ternary ⇒ Object
Returns the value of attribute ternary.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Token
#allow_ooo_offset, #as, #ident, #offset, #tag
Instance Method Summary collapse
-
#callsite? ⇒ Boolean
———————————–.
-
#has_end! ⇒ Object
———————————–.
-
#has_end? ⇒ Boolean
———————————–.
- #has_no_block! ⇒ Object
- #has_no_block? ⇒ Boolean
- #infix ⇒ Object
-
#infix? ⇒ Boolean
———————————–.
- #prefix? ⇒ Boolean (also: #unary)
-
#set_callsite!(x = true) ⇒ Object
———————————–.
-
#set_infix! ⇒ Object
———————————–.
-
#unary=(flag) ⇒ Object
———————————–.
Methods inherited from WToken
Methods inherited from Token
#error, #initialize, #to_s, #ws_munge
Constructor Details
This class inherits a constructor from RubyLexer::Token
Instance Attribute Details
#grouping ⇒ Object
Returns the value of attribute grouping.
95 96 97 |
# File 'lib/rubylexer/token.rb', line 95 def grouping @grouping end |
#ternary ⇒ Object
Returns the value of attribute ternary.
95 96 97 |
# File 'lib/rubylexer/token.rb', line 95 def ternary @ternary end |
#value ⇒ Object
Returns the value of attribute value.
66 67 68 |
# File 'lib/rubylexer/token.rb', line 66 def value @value end |
Instance Method Details
#callsite? ⇒ Boolean
62 63 64 |
# File 'lib/rubylexer/token.rb', line 62 def callsite? @callsite if defined? @callsite end |
#has_end! ⇒ Object
86 87 88 |
# File 'lib/rubylexer/token.rb', line 86 def has_end! @has_end=true end |
#has_end? ⇒ Boolean
91 92 93 |
# File 'lib/rubylexer/token.rb', line 91 def has_end? self===RubyLexer::BEGINWORDS and @has_end||=nil end |
#has_no_block! ⇒ Object
97 98 99 |
# File 'lib/rubylexer/token.rb', line 97 def has_no_block! @has_no_block=true end |
#has_no_block? ⇒ Boolean
101 102 103 |
# File 'lib/rubylexer/token.rb', line 101 def has_no_block? @has_no_block if defined? @has_no_block end |
#infix ⇒ Object
105 106 107 |
# File 'lib/rubylexer/token.rb', line 105 def infix @infix if defined? @infix end |
#infix? ⇒ Boolean
79 80 81 |
# File 'lib/rubylexer/token.rb', line 79 def infix? @infix ||= nil end |
#prefix? ⇒ Boolean Also known as: unary
82 |
# File 'lib/rubylexer/token.rb', line 82 def prefix?; !infix? end |
#set_callsite!(x = true) ⇒ Object
57 58 59 |
# File 'lib/rubylexer/token.rb', line 57 def set_callsite!(x=true) @callsite=x end |
#set_infix! ⇒ Object
69 70 71 |
# File 'lib/rubylexer/token.rb', line 69 def set_infix! @infix=true end |
#unary=(flag) ⇒ Object
74 75 76 |
# File 'lib/rubylexer/token.rb', line 74 def unary= flag @infix=!flag end |