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, #lhs=, #matches?, #wantarrow

Constructor Details

#initialize(starter, linenum) ⇒ WantsEndContext

Returns a new instance of WantsEndContext.



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

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

Instance Attribute Details

#stateObject

Returns the value of attribute state.



187
188
189
# File 'lib/rubylexer/context.rb', line 187

def state
  @state
end

Instance Method Details

#see(lxr, msg) ⇒ Object



189
190
191
# File 'lib/rubylexer/context.rb', line 189

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