Skip to content

Commit

Permalink
Update array type regex to account for missing whitespace (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
pema99 authored Sep 3, 2021
1 parent d4e499a commit e4d98ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ pub fn genfut(opt: Opt) {
let headers = std::fs::read_to_string(PathBuf::from(out_dir).join("lib/a.h"))
.expect("Could not read headers");

let re_array_types = Regex::new(r"struct (futhark_.+_\d+d) ;").expect("Regex failed!");
let re_array_types = Regex::new(r"struct (futhark_.+_\d+d)\s*;").expect("Regex failed!");
let array_types: Vec<String> = re_array_types
.captures_iter(&headers)
.map(|c| c[1].to_owned())
Expand Down

0 comments on commit e4d98ce

Please sign in to comment.