Add support for string in source map.

This commit is contained in:
Jacques Wagener 2019-03-08 00:14:14 +02:00
parent e78964ba49
commit 69de88789a
No known key found for this signature in database
GPG Key ID: C294D1025DA0E923
1 changed files with 5 additions and 1 deletions

View File

@ -5,9 +5,10 @@ from vyper.parser.global_context import (
GlobalContext
)
from vyper.types import (
get_size_of_type,
ByteArrayType,
get_size_of_type,
MappingType,
StringType,
TupleType
)
from vyper import compile_lll
@ -19,6 +20,9 @@ def serialise_var_rec(var_rec):
if isinstance(var_rec.typ, ByteArrayType):
type_str = 'bytes[%s]' % var_rec.typ.maxlen
_size = get_size_of_type(var_rec.typ) * 32
elif isinstance(var_rec.typ, StringType):
type_str = 'string[%s]' % var_rec.typ.maxlen
_size = get_size_of_type(var_rec.typ) * 32
elif isinstance(var_rec.typ, TupleType):
type_str = 'tuple'
_size = get_size_of_type(var_rec.typ) * 32