From 1b7d44ec42bc5be8f07bb67c0fbbddf36f2e3050 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 27 Mar 2025 06:26:01 -0500 Subject: add an enum for messages --- file.proto | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'file.proto') diff --git a/file.proto b/file.proto index 5b8aeff..461b69f 100644 --- a/file.proto +++ b/file.proto @@ -61,15 +61,21 @@ message Sort { // used to auto-format protobuf files message FormatMsg { - repeated string lines = 1; // keys to sort on + enum Type { + MESSAGE = 0; + ENUM = 1; + ONEOF = 2; + } + + int64 depth = 1; // used to indent output int64 maxVarname = 2; // max string length of var names int64 maxVartype = 3; // max string length of var types - repeated FormatMsg inceptionMsgs = 4; // messages inside messages - repeated FormatMsg enums = 5; // locally defined enums - repeated FormatMsg oneofs = 6; // locally defined oneofs - string header = 7; // the 'message {','enum {', etc line + string header = 4; // the 'message {','enum {', etc line + repeated string notes = 5; // unknown lines or comments + repeated FormatMsg msgs = 6; // locally defined messages and enums + repeated string lines = 7; // the variables string footer = 8; // the '}' line - repeated string notes = 9; // unknown lines or comments + Type type = 9; } message Find { -- cgit v1.2.3