Add support for string in source map.
This commit is contained in:
parent
e78964ba49
commit
69de88789a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue