Class: RubyLexer::NestedContexts::AssignmentRhsContext

Inherits:
ImplicitContext show all
Defined in:
lib/rubylexer/context.rb

Instance Attribute Summary

Attributes inherited from NestedContext

#ender, #linenum, #starter

Instance Method Summary collapse

Methods inherited from NestedContext

#lhs, #lhs=, #matches?, #wantarrow

Constructor Details

#initialize(linenum) ⇒ AssignmentRhsContext

Returns a new instance of AssignmentRhsContext.



164
165
166
# File 'lib/rubylexer/context.rb', line 164

def initialize(linenum)
  super(nil,nil,linenum)
end

Instance Method Details

#endtoken(offset) ⇒ Object



176
177
178
# File 'lib/rubylexer/context.rb', line 176

def endtoken offset
  AssignmentRhsEndToken.new offset
end

#multi_assign?Boolean

Returns:

  • (Boolean)


173
174
175
# File 'lib/rubylexer/context.rb', line 173

def multi_assign?
  @multi if defined? @multi 
end

#see(lxr, msg) ⇒ Object



167
168
169
170
171
172
# File 'lib/rubylexer/context.rb', line 167

def see lxr,msg
  case msg
  when :semi; lxr.parsestack.pop
  when :comma,:splat; @multi=true
  end
end