Class: Furnace::AVM2::Tokens::SlotNameToken
- Inherits:
-
Code::SurroundedToken
- Object
- Code::SurroundedToken
- Furnace::AVM2::Tokens::SlotNameToken
- Defined in:
- lib/furnace-avm2/source/declaration_tokens/slot_name_token.rb
Instance Method Summary collapse
-
#initialize(origin, options = {}) ⇒ SlotNameToken
constructor
A new instance of SlotNameToken.
- #text_before ⇒ Object
Constructor Details
#initialize(origin, options = {}) ⇒ SlotNameToken
Returns a new instance of SlotNameToken.
3 4 5 6 7 |
# File 'lib/furnace-avm2/source/declaration_tokens/slot_name_token.rb', line 3 def initialize(origin, ={}) super(origin, [ MultinameToken.new(origin, origin.name, .merge(omit_ns: true)) ], ) end |
Instance Method Details
#text_before ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/furnace-avm2/source/declaration_tokens/slot_name_token.rb', line 9 def text_before if @options[:const] "const " else "var " end end |