Added chars in AEVM

This commit is contained in:
radrow 2019-09-05 13:36:21 +02:00
parent f8cd3b87f3
commit 92d1e10d0e
2 changed files with 3 additions and 0 deletions

View File

@ -461,6 +461,8 @@ ast_body({bool, _, Bool}, _Icode) -> %BOOL as ints
#integer{value = Value}; #integer{value = Value};
ast_body({int, _, Value}, _Icode) -> ast_body({int, _, Value}, _Icode) ->
#integer{value = Value}; #integer{value = Value};
ast_body({char, _, Value}, _Icode) ->
#integer{value = Value};
ast_body({bytes, _, Bin}, _Icode) -> ast_body({bytes, _, Bin}, _Icode) ->
case aeb_memory:binary_to_words(Bin) of case aeb_memory:binary_to_words(Bin) of
[Word] -> #integer{value = Word}; [Word] -> #integer{value = Word};

View File

@ -74,6 +74,7 @@ builtin_types() ->
Word = fun([]) -> word end, Word = fun([]) -> word end,
#{ "bool" => Word #{ "bool" => Word
, "int" => Word , "int" => Word
, "char" => Word
, "bits" => Word , "bits" => Word
, "string" => fun([]) -> string end , "string" => fun([]) -> string end
, "address" => Word , "address" => Word