aboutsummaryrefslogtreecommitdiff
path: root/grammar/production.go
diff options
context:
space:
mode:
Diffstat (limited to 'grammar/production.go')
-rw-r--r--grammar/production.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/grammar/production.go b/grammar/production.go
index a935037..d4ea7a1 100644
--- a/grammar/production.go
+++ b/grammar/production.go
@@ -80,9 +80,9 @@ func newProductionSet() *productionSet {
}
}
-func (ps *productionSet) append(prod *production) bool {
+func (ps *productionSet) append(prod *production) {
if _, ok := ps.id2Prod[prod.id]; ok {
- return false
+ return
}
if prod.lhs.isStart() {
@@ -98,8 +98,6 @@ func (ps *productionSet) append(prod *production) bool {
ps.lhs2Prods[prod.lhs] = []*production{prod}
}
ps.id2Prod[prod.id] = prod
-
- return true
}
func (ps *productionSet) findByID(id productionID) (*production, bool) {