Cache ItemSet#next_symbols - #28
This commit is contained in:
parent
74d94fef72
commit
95b3dc6550
@ -46,7 +46,7 @@ class Propane
|
|||||||
# @return [Set<Token, RuleSet>]
|
# @return [Set<Token, RuleSet>]
|
||||||
# Set of next symbols for all Items in this ItemSet.
|
# Set of next symbols for all Items in this ItemSet.
|
||||||
def next_symbols
|
def next_symbols
|
||||||
Set.new(@items.map(&:next_symbol).compact)
|
@_next_symbols ||= Set.new(@items.map(&:next_symbol).compact)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Build a next ItemSet for the given next symbol.
|
# Build a next ItemSet for the given next symbol.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user