Skip to content

Commit

Permalink
Updated not to process *io as for io(<io_spec>). (#1828)
Browse files Browse the repository at this point in the history
* Update FieldDescription.cpp

Updated not to process *io as for io(<io_spec>).

* Revert "Update FieldDescription.cpp"

This reverts commit 288cb44.

* Updated the pattern so that it matches "io" or "@io" but "*io".

Updated the pattern so that it matches "io" or "@io" but "*io".
  • Loading branch information
hchen99 authored Jan 28, 2025
1 parent db99860 commit 525f09e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ 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) ;
ret_str = get_regex_field(comment , "(^|[^*])@?io[\\({]([^\\)}]+)[\\)}]" , 2) ;
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) ;
comment = get_regex_field(comment , "(.*)(^|[^*])@?io[\\({]([^\\)}]+)[\\)}]" , 1) +
get_regex_field(comment , "(^|[^*])@?io[\\({]([^\\)}]+)[\\)}](.*)" , 3) ;
}

/*
Expand Down

0 comments on commit 525f09e

Please sign in to comment.