| 411 | } |
| 412 | |
| 413 | bool CompileHelper::compileTfPortList(Procedure* parent, const FileContent* fC, |
| 414 | NodeId tf_port_list, |
| 415 | TfPortList& targetList) { |
| 416 | bool result = true; |
| 417 | /* |
| 418 | n<c1> u<7> t<StringConst> p<29> s<27> l<10> |
| 419 | n<> u<8> t<IntegerAtomType_Int> p<9> l<12> |
| 420 | n<> u<9> t<Data_type> p<10> c<8> l<12> |
| 421 | n<> u<10> t<Function_data_type> p<11> c<9> l<12> |
| 422 | n<> u<11> t<Function_data_type_or_implicit> p<24> c<10> s<12> l<12> |
| 423 | n<try_get> u<12> t<StringConst> p<24> s<22> l<12> |
| 424 | n<> u<13> t<IntegerAtomType_Int> p<14> l<12> |
| 425 | n<> u<14> t<Data_type> p<15> c<13> l<12> |
| 426 | n<> u<15> t<Data_type_or_implicit> p<21> c<14> s<16> l<12> |
| 427 | n<keyCount> u<16> t<StringConst> p<21> s<20> l<12> |
| 428 | n<1> u<17> t<IntConst> p<18> l<12> |
| 429 | n<> u<18> t<Primary_literal> p<19> c<17> l<12> |
| 430 | n<> u<19> t<Primary> p<20> c<18> l<12> |
| 431 | n<> u<20> t<Expression> p<21> c<19> l<12> |
| 432 | n<> u<21> t<Tf_port_item> p<22> c<15> l<12> |
| 433 | n<> u<22> t<Tf_port_list> p<24> c<21> s<23> l<12> |
| 434 | n<> u<23> t<Endfunction> p<24> l<13> |
| 435 | n<> u<24> t<Function_body_declaration> p<25> c<11> l<12> |
| 436 | n<> u<25> t<Function_declaration> p<26> c<24> l<12> |
| 437 | n<> u<26> t<Class_method> p<27> c<25> l<12> |
| 438 | */ |
| 439 | /* |
| 440 | Or |
| 441 | n<get> u<47> t<StringConst> p<55> s<53> l<18> |
| 442 | n<> u<48> t<PortDir_Ref> p<49> l<18> |
| 443 | n<> u<49> t<Tf_port_direction> p<52> c<48> s<50> l<18> |
| 444 | n<> u<50> t<Data_type_or_implicit> p<52> s<51> l<18> |
| 445 | n<message> u<51> t<StringConst> p<52> l<18> |
| 446 | n<> u<52> t<Tf_port_item> p<53> c<49> l<18> |
| 447 | */ |
| 448 | // Compile arguments |
| 449 | if (tf_port_list && (fC->Type(tf_port_list) == VObjectType::paTf_port_list)) { |
| 450 | NodeId tf_port_item = fC->Child(tf_port_list); |
| 451 | while (tf_port_item) { |
| 452 | Value* value = nullptr; |
| 453 | NodeId tf_data_type_or_implicit = fC->Child(tf_port_item); |
| 454 | NodeId tf_data_type = fC->Child(tf_data_type_or_implicit); |
| 455 | VObjectType tf_port_direction_type = fC->Type(tf_data_type_or_implicit); |
| 456 | NodeId tf_param_name = fC->Sibling(tf_data_type_or_implicit); |
| 457 | if (tf_port_direction_type == VObjectType::paTfPortDir_Ref || |
| 458 | tf_port_direction_type == VObjectType::paTfPortDir_ConstRef || |
| 459 | tf_port_direction_type == VObjectType::paTfPortDir_Inp || |
| 460 | tf_port_direction_type == VObjectType::paTfPortDir_Out || |
| 461 | tf_port_direction_type == VObjectType::paTfPortDir_Inout) { |
| 462 | tf_data_type = fC->Sibling(tf_data_type_or_implicit); |
| 463 | tf_param_name = fC->Sibling(tf_data_type); |
| 464 | } else { |
| 465 | tf_port_direction_type = VObjectType::sl_INVALID_; |
| 466 | } |
| 467 | NodeId type = fC->Child(tf_data_type); |
| 468 | VObjectType the_type = fC->Type(type); |
| 469 | std::string typeName; |
| 470 | if (the_type == VObjectType::slStringConst) { |