class SyntaxTree::Parser
def on_dyna_symbol(string_content)
:call-seq:
def on_dyna_symbol(string_content) if (symbeg = find_token(SymBeg)) # A normal dynamic symbol tokens.delete(symbeg) tstring_end = consume_tstring_end(symbeg.location) DynaSymbol.new( quote: symbeg.value, parts: string_content.parts, location: symbeg.location.to(tstring_end.location) ) else # A dynamic symbol as a hash key tstring_beg = consume_token(TStringBeg) label_end = consume_token(LabelEnd) DynaSymbol.new( parts: string_content.parts, quote: label_end.value[0], location: tstring_beg.location.to(label_end.location) ) end end