Class: RubyLexer::NestedContexts::WantsEndContext

Inherits:
NestedContext
  • Object
show all
Defined in:
lib/rubylexer/context.rb

Direct Known Subclasses

ClassContext, DefContext

Instance Attribute Summary collapse

Attributes inherited from NestedContext

#ender, #linenum, #starter

Instance Method Summary collapse

Methods inherited from NestedContext

#lhs=, #matches?, #wantarrow

Constructor Details

#initialize(starter, linenum) ⇒ WantsEndContext

Returns a new instance of WantsEndContext.



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

def initialize(starter,linenum)
  super(starter,'end',linenum)
  @state=nil
end

Instance Attribute Details

#stateObject

Returns the value of attribute state.



180
181
182
# File 'lib/rubylexer/context.rb', line 180

def state
  @state
end

Instance Method Details

#see(lxr, msg) ⇒ Object



182
183
184
# File 'lib/rubylexer/context.rb', line 182

def see lxr,msg
  msg==:rescue and lxr.parsestack.push_rescue_sm 
end