diff --git a/lib/propane/parser/item_set.rb b/lib/propane/parser/item_set.rb index 2fe8403..eedaa34 100644 --- a/lib/propane/parser/item_set.rb +++ b/lib/propane/parser/item_set.rb @@ -46,7 +46,7 @@ class Propane # @return [Set] # Set of next symbols for all Items in this ItemSet. def next_symbols - Set.new(@items.map(&:next_symbol).compact) + @_next_symbols ||= Set.new(@items.map(&:next_symbol).compact) end # Build a next ItemSet for the given next symbol.