7 package Nasm
::insns
::Operands
;
10 use Scalar
::Util
'reftype';
14 Creates a new Nasm::insns::Operands object
19 my( $class, $string ) = @_;
20 $string =~ s/^ \s+ //gx;
21 $string =~ s/ \s+ $//gx;
23 if( $string eq 'ignore' ){
24 return bless \
$string, $class;
27 my $self = bless [], $class;
30 return $self unless $string;
31 return $self if $string eq 'void';
33 @
$self = split ',', $string;
41 Stringifys an Nasm::insns::Operands object
48 return '' if reftype
$self eq 'SCALAR';
49 return '' if reftype
$self eq 'REF';
51 #return '()' unless @$self;
52 return '('.join(',',@
$self).')';