Skip to content

Commit a8ab630

Browse files
authored
Merge pull request starwing#53 from jj4jj/master
add allow_alias enum option processing , skip enum value uniq check i…
2 parents dcff4c9 + 0f9c6f5 commit a8ab630

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

protoc.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,11 @@ local function check_enum(self, lex, info)
842842
for _, v in iter(info, 'value') do
843843
lex.pos = self.locmap[v]
844844
check_dup(self, lex, 'enum name', names, 'name', v)
845-
check_dup(self, lex, 'enum number', numbers, 'number', v)
845+
if info.options and info.options.options and info.options.options.allow_alias then
846+
--nothing todo for allow_alias skip the enum value check
847+
else
848+
check_dup(self, lex, 'enum number', numbers, 'number', v)
849+
end
846850
end
847851
end
848852

0 commit comments

Comments
 (0)