Skip to content

Commit

Permalink
Update FieldDescription.cpp
Browse files Browse the repository at this point in the history
Updated not to process *io as for io(<io_spec>).
  • Loading branch information
hchen99 committed Jan 14, 2025
1 parent e252513 commit 288cb44
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,16 @@ void FieldDescription::parseComment(std::string comment) {
comment = get_regex_field(comment , "(.*)@?trick_io[\\({]([^\\)}]+)[\\)}]" , 1) +
get_regex_field(comment , "@?trick_io[\\({]([^\\)}]+)[\\)}](.*)" , 2) ;
}
ret_str = get_regex_field(comment , "@?io[\\({]([^\\)}]+)[\\)}]" , 1) ;
if ( ! ret_str.empty()) {
io = io_map[ret_str] ;
if(debug_level >= 4) std::cout << "go for io " << io << std::endl ;
io_found = true ;
comment = get_regex_field(comment , "(.*)@?io[\\({]([^\\)}]+)[\\)}]" , 1) +
get_regex_field(comment , "@?io[\\({]([^\\)}]+)[\\)}](.*)" , 2) ;

if ( comment.rfind("*io", 0) != 0 ) {
ret_str = get_regex_field(comment , "@?io[\\({]([^\\)}]+)[\\)}]" , 1) ;
if ( ! ret_str.empty()) {
io = io_map[ret_str] ;
if(debug_level >= 4) std::cout << "go for io " << io << std::endl ;
io_found = true ;
comment = get_regex_field(comment , "(.*)@?io[\\({]([^\\)}]+)[\\)}]" , 1) +
get_regex_field(comment , "@?io[\\({]([^\\)}]+)[\\)}](.*)" , 2) ;
}
}

/*
Expand Down

0 comments on commit 288cb44

Please sign in to comment.