Simplify ast_typerep
This commit is contained in:
parent
3255c62e0e
commit
45a62f0807
@ -696,11 +696,8 @@ ast_typerep({qid, _, Name}, Icode) ->
|
||||
lookup_type_id(Name, [], Icode);
|
||||
ast_typerep({con, _, _}, _) ->
|
||||
word; %% Contract type
|
||||
ast_typerep({bytes_t, _, Len}, _) when Len =< 32 ->
|
||||
word;
|
||||
ast_typerep({bytes_t, _, Len}, _) ->
|
||||
Words = (31 + Len) div 32,
|
||||
{tuple, lists:duplicate(Words, word)};
|
||||
bytes_t(Len);
|
||||
ast_typerep({app_t, _, {id, _, Name}, Args}, Icode) ->
|
||||
ArgReps = [ ast_typerep(Arg, Icode) || Arg <- Args ],
|
||||
lookup_type_id(Name, ArgReps, Icode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user