Class: Furnace::AVM2::Tokens::CaseToken
- Inherits:
-
Code::SurroundedToken
- Object
- Code::SurroundedToken
- Furnace::AVM2::Tokens::CaseToken
- Defined in:
- lib/furnace-avm2/source/implementation_tokens/case_token.rb
Instance Method Summary collapse
-
#initialize(origin, value, options) ⇒ CaseToken
constructor
A new instance of CaseToken.
- #text_after ⇒ Object
- #text_before ⇒ Object
Constructor Details
#initialize(origin, value, options) ⇒ CaseToken
Returns a new instance of CaseToken.
3 4 5 6 |
# File 'lib/furnace-avm2/source/implementation_tokens/case_token.rb', line 3 def initialize(origin, value, ) super(origin, [ value ], ) @value = value end |
Instance Method Details
#text_after ⇒ Object
16 17 18 |
# File 'lib/furnace-avm2/source/implementation_tokens/case_token.rb', line 16 def text_after ":\n" end |
#text_before ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/furnace-avm2/source/implementation_tokens/case_token.rb', line 8 def text_before if @value "case " else "default" end end |