summaryrefslogtreecommitdiff
path: root/tool/lrama/lib/lrama/grammar/destructor.rb
blob: 4b7059e9236ccb7f244cf2cd4eb0c6d54d37ba26 (plain)
1
2
3
4
5
6
7
8
9
module Lrama
  class Grammar
    class Destructor < Struct.new(:ident_or_tags, :token_code, :lineno, keyword_init: true)
      def translated_code(tag)
        Code::DestructorCode.new(type: :destructor, token_code: token_code, tag: tag).translated_code
      end
    end
  end
end