Class: RubyLexer::NestedContexts::NestedContext
- Inherits:
-
Object
- Object
- RubyLexer::NestedContexts::NestedContext
- Defined in:
- lib/rubylexer/context.rb
Direct Known Subclasses
AssignmentContext, BeginEndContext, BlockContext, ExpectDoOrNlContext, ExpectThenOrNlContext, ImplicitLhsContext, ListContext, ParenContext, StringContext, StringInclusionContext, TernaryContext, TopLevelContext, VContext, WantsEndContext
Instance Attribute Summary collapse
-
#ender ⇒ Object
readonly
Returns the value of attribute ender.
-
#linenum ⇒ Object
readonly
Returns the value of attribute linenum.
-
#starter ⇒ Object
readonly
Returns the value of attribute starter.
Instance Method Summary collapse
-
#initialize(starter, ender, linenum) ⇒ NestedContext
(also: #dflt_initialize)
constructor
A new instance of NestedContext.
- #lhs ⇒ Object
-
#lhs=(*x) ⇒ Object
do nothing.
- #matches?(tok) ⇒ Boolean
- #see(lxr, msg) ⇒ Object
- #wantarrow ⇒ Object
Constructor Details
#initialize(starter, ender, linenum) ⇒ NestedContext Also known as: dflt_initialize
Returns a new instance of NestedContext.
27 28 29 |
# File 'lib/rubylexer/context.rb', line 27 def initialize(starter,ender,linenum) @starter,@ender,@linenum=starter,ender,linenum end |
Instance Attribute Details
#ender ⇒ Object (readonly)
Returns the value of attribute ender.
25 26 27 |
# File 'lib/rubylexer/context.rb', line 25 def ender @ender end |
#linenum ⇒ Object (readonly)
Returns the value of attribute linenum.
26 27 28 |
# File 'lib/rubylexer/context.rb', line 26 def linenum @linenum end |
#starter ⇒ Object (readonly)
Returns the value of attribute starter.
24 25 26 |
# File 'lib/rubylexer/context.rb', line 24 def starter @starter end |
Instance Method Details
#lhs ⇒ Object
39 |
# File 'lib/rubylexer/context.rb', line 39 def lhs; false end |
#lhs=(*x) ⇒ Object
do nothing
38 |
# File 'lib/rubylexer/context.rb', line 38 def lhs=*x; end |
#matches?(tok) ⇒ Boolean
33 34 35 |
# File 'lib/rubylexer/context.rb', line 33 def matches?(tok) @ender==tok end |
#see(lxr, msg) ⇒ Object
37 |
# File 'lib/rubylexer/context.rb', line 37 def see lxr,msg; end |
#wantarrow ⇒ Object
40 |
# File 'lib/rubylexer/context.rb', line 40 def wantarrow; false end |