OBJ_ALIAS_RE over the continuation-joined text: /^[ \t]*#[ \t]*define[ \t]+(\w+)[ \t]+(?:struct[ \t]+)*[A-Za-z_]\w*[ \t\r]*$/gm
(stripped: &[u8], out: &mut Vec<String>)
| 674 | |
| 675 | /// OBJ_ALIAS_RE over the continuation-joined text: |
| 676 | /// /^[ \t]*#[ \t]*define[ \t]+(\w+)[ \t]+(?:struct[ \t]+)*[A-Za-z_]\w*[ \t\r]*$/gm |
| 677 | fn scan_alias_names(stripped: &[u8], out: &mut Vec<String>) { |
| 678 | // joined = stripped.replace(/\\\r?\n/g, ' ') |
| 679 | let mut joined = Vec::with_capacity(stripped.len()); |
| 680 | let mut i = 0; |
| 681 | while i < stripped.len() { |
| 682 | let b = stripped[i]; |
| 683 | if b == b'\\' { |
| 684 | if stripped.get(i + 1) == Some(&b'\n') { |
| 685 | joined.push(b' '); |
| 686 | i += 2; |
| 687 | continue; |
| 688 | } |
| 689 | if stripped.get(i + 1) == Some(&b'\r') && stripped.get(i + 2) == Some(&b'\n') { |
| 690 | joined.push(b' '); |
| 691 | i += 3; |
| 692 | continue; |
| 693 | } |
| 694 | } |
| 695 | joined.push(b); |
| 696 | i += 1; |
| 697 | } |
| 698 | for line in joined.split(|&b| b == b'\n') { |
| 699 | if let Some(name) = alias_line(line) { |
| 700 | push_str(out, name); |
| 701 | } |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | #[inline] |
no test coverage detected