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>)
| 685 | |
| 686 | /// OBJ_ALIAS_RE over the continuation-joined text: |
| 687 | /// /^[ \t]*#[ \t]*define[ \t]+(\w+)[ \t]+(?:struct[ \t]+)*[A-Za-z_]\w*[ \t\r]*$/gm |
| 688 | fn scan_alias_names(stripped: &[u8], out: &mut Vec<String>) { |
| 689 | // joined = stripped.replace(/\\\r?\n/g, ' ') |
| 690 | let mut joined = Vec::with_capacity(stripped.len()); |
| 691 | let mut i = 0; |
| 692 | while i < stripped.len() { |
| 693 | let b = stripped[i]; |
| 694 | if b == b'\\' { |
| 695 | if stripped.get(i + 1) == Some(&b'\n') { |
| 696 | joined.push(b' '); |
| 697 | i += 2; |
| 698 | continue; |
| 699 | } |
| 700 | if stripped.get(i + 1) == Some(&b'\r') && stripped.get(i + 2) == Some(&b'\n') { |
| 701 | joined.push(b' '); |
| 702 | i += 3; |
| 703 | continue; |
| 704 | } |
| 705 | } |
| 706 | joined.push(b); |
| 707 | i += 1; |
| 708 | } |
| 709 | for line in joined.split(|&b| b == b'\n') { |
| 710 | if let Some(name) = alias_line(line) { |
| 711 | push_str(out, name); |
| 712 | } |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | #[inline] |
no test coverage detected