our
$VERSION
= 0.005_000;
package
string_hashref::method;
package
object;
our
hashref
$properties
= {};
sub
ast_to_rperl__generate {
{
my
string_hashref::method
$RETURN_TYPE
};
(
my
object
$self
,
my
string_hashref
$modes
) =
@ARG
;
my
string_hashref
$rperl_source_group
= {
PMC
=>
q{}
};
my
string
$self_class
=
ref
$self
;
if
(
$self_class
eq
'SubExpression_159'
) {
$self
=
$self
->{children}->[0];
$self_class
=
ref
$self
;
}
if
( (
$self_class
) ne
'ArrayReference_218'
) {
die
RPerl::Parser::rperl_rule__replace(
'ERROR ECOGEASRP000, CODE GENERATOR, ABSTRACT SYNTAX TO RPERL: Grammar rule '
. (
$self_class
)
.
' found where ArrayReference_218 or SubExpression_159 expected, dying'
)
.
"\n"
;
}
my
string
$left_bracket
=
$self
->{children}->[0];
my
object
$list_elements_optional
=
$self
->{children}->[1];
my
string
$right_bracket
=
$self
->{children}->[2];
$rperl_source_group
->{PMC} .=
$left_bracket
;
if
(
exists
$list_elements_optional
->{children}->[0] ) {
my
string_hashref
$rperl_source_subgroup
=
$list_elements_optional
->{children}->[0]->ast_to_rperl__generate(
$modes
);
RPerl::Generator::source_group_append(
$rperl_source_group
,
$rperl_source_subgroup
);
}
$rperl_source_group
->{PMC} .=
$right_bracket
;
return
$rperl_source_group
;
}
sub
ast_to_cpp__generate__CPPOPS_PERLTYPES {
{
my
string_hashref::method
$RETURN_TYPE
};
(
my
object
$self
,
my
string_hashref
$modes
) =
@ARG
;
my
string_hashref
$cpp_source_group
= {
CPP
=>
q{// <<< RP::DS::A::R __DUMMY_SOURCE_CODE CPPOPS_PERLTYPES >>>}
.
"\n"
};
return
$cpp_source_group
;
}
sub
ast_to_cpp__generate__CPPOPS_CPPTYPES {
{
my
string_hashref::method
$RETURN_TYPE
};
(
my
object
$self
,
my
string_hashref
$modes
) =
@ARG
;
my
string_hashref
$cpp_source_group
= {
CPP
=>
q{}
};
my
string
$self_class
=
ref
$self
;
if
(
$self_class
eq
'SubExpression_159'
) {
$self
=
$self
->{children}->[0];
$self_class
=
ref
$self
;
}
if
( (
$self_class
) ne
'ArrayReference_218'
) {
die
RPerl::Parser::rperl_rule__replace(
'ERROR ECOGEASCP000, CODE GENERATOR, ABSTRACT SYNTAX TO C++: Grammar rule '
. (
$self_class
)
.
' found where ArrayReference_218 or SubExpression_159 expected, dying'
)
.
"\n"
;
}
my
object
$list_elements_optional
=
$self
->{children}->[1];
$cpp_source_group
->{CPP} .=
'{'
;
if
(
exists
$list_elements_optional
->{children}->[0] ) {
my
string_hashref
$cpp_source_subgroup
=
$list_elements_optional
->{children}->[0]->ast_to_cpp__generate__CPPOPS_CPPTYPES(
$modes
);
RPerl::Generator::source_group_append(
$cpp_source_group
,
$cpp_source_subgroup
);
}
$cpp_source_group
->{CPP} .=
'}'
;
return
$cpp_source_group
;
}
sub
ast_to_cpp__generate__CPPOPS_CPPTYPES__bson_build {
{
my
string_hashref::method
$RETURN_TYPE
};
(
my
object
$self
,
my
string_hashref
$modes
) =
@ARG
;
my
string_hashref
$cpp_source_group
= {
CPP
=>
q{}
};
my
string
$self_class
=
ref
$self
;
if
(
$self_class
eq
'SubExpression_159'
) {
$self
=
$self
->{children}->[0];
$self_class
=
ref
$self
;
}
if
( (
$self_class
) ne
'ArrayReference_218'
) {
die
RPerl::Parser::rperl_rule__replace(
'ERROR ECOGEASCP000, CODE GENERATOR, ABSTRACT SYNTAX TO C++: Grammar rule '
. (
$self_class
)
.
' found where ArrayReference_218 or SubExpression_159 expected, dying'
)
.
"\n"
;
}
my
object
$list_elements_optional
=
$self
->{children}->[1];
$cpp_source_group
->{CPP} .=
'bson_arrayref_begin << '
;
if
(
exists
$list_elements_optional
->{children}->[0] ) {
my
string_hashref
$cpp_source_subgroup
=
$list_elements_optional
->{children}->[0]->ast_to_cpp__generate__CPPOPS_CPPTYPES__bson_build(
$modes
);
RPerl::Generator::source_group_append(
$cpp_source_group
,
$cpp_source_subgroup
);
}
$cpp_source_group
->{CPP} .=
' << bson_arrayref_end'
;
return
$cpp_source_group
;
}
1;