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