Merge pull request #141 from radrow/icode-char

Added chars in AEVM
This commit is contained in:
Hans Svensson 2019-09-06 11:08:17 +02:00 committed by GitHub
commit 17f8cbb4d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

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

View File

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