Added chars in AEVM #632

Merged
zxq9 merged 1 commits from github/fork/radrow/icode-char into master 2019-09-06 18:08:18 +09:00
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