55 "strings"
66 "unicode"
77
8+ "github.com/gnames/gnlib/ent/nomcode"
89 "github.com/gnames/gnparser/ent/internal/preprocess"
9- "github.com/gnames/gnparser/ent/nomcode"
1010
1111 "github.com/gnames/gnparser/ent/parsed"
1212 "github.com/gnames/gnparser/ent/str"
@@ -110,13 +110,13 @@ func (p *Engine) newName(n *node32) nameData {
110110 p .hybrid = & annot
111111 name = p .newNamedSpeciesHybridNode (n )
112112 case ruleGraftChimeraFormula :
113- if p .code == nomcode .Cultivar {
113+ if p .code == nomcode .Cultivars {
114114 annot = parsed .GraftChimeraFormulaAnnot
115115 p .hybrid = & annot
116116 name = p .newGraftChimeraFormulaNode (n )
117117 }
118118 case ruleNamedGenusGraftChimera :
119- if p .code == nomcode .Cultivar {
119+ if p .code == nomcode .Cultivars {
120120 annot = parsed .NamedGraftChimeraAnnot
121121 p .hybrid = & annot
122122 name = p .newNamedGenusGraftChimeraNode (n )
@@ -447,7 +447,7 @@ func (p *Engine) botanicalUninomial(n *node32) bool {
447447 return false
448448 }
449449 w := p .newWordNode (n , parsed .AuthorWordType )
450- if p .code == nomcode .Botanical || p .code == nomcode .Cultivar {
450+ if p .code == nomcode .Botanical || p .code == nomcode .Cultivars {
451451 return true
452452 }
453453
@@ -698,7 +698,7 @@ func (p *Engine) newSpeciesNode(n *node32) *speciesNode {
698698 case ruleSubgenus :
699699 w := p .newWordNode (n .up , parsed .SubgenusType )
700700 switch p .code {
701- case nomcode .Botanical , nomcode .Cultivar :
701+ case nomcode .Botanical , nomcode .Cultivars :
702702 // Botanical code has author of genus here
703703 case nomcode .Zoological :
704704 sg = w
@@ -717,7 +717,7 @@ func (p *Engine) newSpeciesNode(n *node32) *speciesNode {
717717 infs = p .newInfraspeciesGroup (n )
718718 case ruleCultivar , ruleCultivarRecursive :
719719 switch p .code {
720- case nomcode .Cultivar :
720+ case nomcode .Cultivars :
721721 cultivar = p .newCultivarEpithetNode (n , parsed .CultivarType )
722722 default :
723723 p .tail = string (p .buffer [n .begin - 2 : len (p .buffer )- 1 ])
@@ -726,7 +726,7 @@ func (p *Engine) newSpeciesNode(n *node32) *speciesNode {
726726 n = n .next
727727 }
728728 p .cardinality = 2 + len (infs )
729- if cultivar != nil && p .code == nomcode .Cultivar {
729+ if cultivar != nil && p .code == nomcode .Cultivars {
730730 p .cultivar = true
731731 p .cardinality += 1
732732 }
@@ -879,7 +879,7 @@ func (p *Engine) newUninomialNode(n *node32) *uninomialNode {
879879 CultivarEpithet : cultivar ,
880880 }
881881 p .cardinality = 1
882- if cultivar != nil && p .code == nomcode .Cultivar {
882+ if cultivar != nil && p .code == nomcode .Cultivars {
883883 p .cultivar = true
884884 p .cardinality += 1
885885 }
@@ -1377,7 +1377,7 @@ func (p *Engine) newCultivarEpithetNode(n *node32, wt parsed.WordType) *cultivar
13771377 Start : int (t .begin ),
13781378 End : int (t .end ),
13791379 }
1380- cult := p .code == nomcode .Cultivar
1380+ cult := p .code == nomcode .Cultivars
13811381 if ! cult {
13821382 p .tail = " " + string (p .buffer [n .begin - 1 :len (p .buffer )- 1 ])
13831383 return nil
0 commit comments