summaryrefslogtreecommitdiff
path: root/tool/lrama/lib/lrama/grammar/precedence.rb
blob: fed739b3c047a47247d0a0a53430d5d0621a8de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
module Lrama
  class Grammar
    class Precedence < Struct.new(:type, :precedence, keyword_init: true)
      include Comparable

      def <=>(other)
        self.precedence <=> other.precedence
      end
    end
  end
end