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