aboutsummaryrefslogtreecommitdiffstats
path: root/tool/lrama/lib/lrama/grammar/counter.rb
blob: c13f4ec3e382b088e64a70b80543cb12421875ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Lrama
  class Grammar
    class Counter
      def initialize(number)
        @number = number
      end

      def increment
        n = @number
        @number += 1
        n
      end
    end
  end
end