Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Oct 18, 2023
1 parent f2a10c9 commit cb7e14a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/asn1/src/asn1ct.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,8 @@ exclusive_dec_command(_, TNL, _) ->
throw({error,{"unexpected error when creating partial "
"decode command",TNL}}).

exclusive_dec_choice_comps(_, [], Acc) ->
lists:reverse(Acc);
exclusive_dec_choice_comps([#'ComponentType'{name=C,typespec=TS}|Comps],
[{C,Directive}|Rest], Acc) ->
case Directive of
Expand All @@ -1617,20 +1619,18 @@ exclusive_dec_choice_comps([#'ComponentType'{name=C,typespec=TS}|Comps],
[Command,Tag] when is_atom(Command) ->
[[Command,Tag,CompAcc]|Acc]
end,
exclusive_dec_command({'CHOICE',Comps}, Rest, NewAcc);
exclusive_dec_choice_comps(Comps, Rest, NewAcc);
undecoded ->
TagCommand = get_tag_command(TS, ?ALTERNATIVE_UNDECODED, mandatory),
exclusive_dec_command({'CHOICE',Comps}, Rest, [TagCommand|Acc]);
exclusive_dec_choice_comps(Comps, Rest, [TagCommand|Acc]);
parts ->
TagCommand = get_tag_command(TS, ?ALTERNATIVE_PARTS, mandatory),
exclusive_dec_command({'CHOICE',Comps}, Rest, [TagCommand|Acc])
exclusive_dec_choice_comps(Comps, Rest, [TagCommand|Acc])
end;
exclusive_dec_choice_comps([#'ComponentType'{typespec=TS}|Cs],
TNL, Acc) ->
TagCommand = get_tag_command(TS, ?ALTERNATIVE, mandatory),
exclusive_dec_choice_comps(Cs, TNL, [TagCommand|Acc]);
exclusive_dec_choice_comps(_, [], Acc) ->
lists:reverse(Acc).
exclusive_dec_choice_comps(Cs, TNL, [TagCommand|Acc]).

partial_inc_dec_toptype([T|_]) when is_atom(T) ->
T;
Expand Down

0 comments on commit cb7e14a

Please sign in to comment.