summaryrefslogtreecommitdiff
path: root/protoParse.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-23 07:43:08 -0500
committerJeff Carr <[email protected]>2025-09-23 07:43:08 -0500
commit08dc949873de9e8b4d4c1bb3daeecc14f8cc326b (patch)
tree8fa284badbbbd47fbc2f2b88ef25b43c4090fe9d /protoParse.go
parente9965f51092ef287b3ea0a8075c4fc359d37a47a (diff)
compiles with new forgepb proto files
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) {