summaryrefslogtreecommitdiff
path: root/protoParse.go
diff options
context:
space:
mode:
Diffstat (limited to 'protoParse.go')
-rw-r--r--protoParse.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/protoParse.go b/protoParse.go
index 474028c..33951d2 100644
--- a/protoParse.go
+++ b/protoParse.go
@@ -91,12 +91,12 @@ func (pf *File) protoParse() error {
}
pf.makeSortTable()
- // for i, s := range slices.Backward(pf.ToSort) {
return nil
}
func (pf *File) makeSortTable() {
pf.sortWhat(pf.Bases)
+ // log.Info("TO SORT AFTER BASES:", pf.ToSort)
pf.sortWhat(pf.Base)
// everything else
@@ -164,9 +164,14 @@ func (pf *File) parseForMessage(line string) *MsgName {
msg = new(MsgName)
base := cases.Title(language.English, cases.NoLower).String(pf.Filebase)
- prefix := "message " + base + "s {" // only look for this for now
+ prefix := "message " + base + "s {" // only look for this for now
+ prefixEnglishIsWeird := "message " + base + "es {" // only look for this for now
+
if strings.HasPrefix(line, prefix) {
pf.Bases = msg
+ } else if strings.HasPrefix(line, prefixEnglishIsWeird) {
+ pf.Bases = msg
+ // panic("got here! :" + prefixEnglishIsWeird)
} else {
prefix := "message " + base + " {" // only look for this for now
if strings.HasPrefix(line, prefix) {