Add Item#complete?
This commit is contained in:
1 parent
8b152abaa7
commit
c1769503a8
1 file changed
+9
@@ -72,6 +72,15 @@ class Propane
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Return whether the item is "complete", meaning that the parse position
|
||||||
|
# marker is at the end of the rule.
|
||||||
|
#
|
||||||
|
# @return [Boolean]
|
||||||
|
# Whether the item is "complete".
|
||||||
|
def complete?
|
||||||
|
@position == @rule.components.size
|
||||||
|
end
|
||||||
|
|
||||||
# Get the following symbol for the Item.
|
# Get the following symbol for the Item.
|
||||||
#
|
#
|
||||||
# That is, the symbol which follows the parse position marker in the
|
# That is, the symbol which follows the parse position marker in the
|
||||||
|
|||||||
Reference in new issue
Block a user