Creates an empty instruction sequence. Fields are given default values.
()
| 78 | /// Creates an empty instruction sequence. Fields are given default |
| 79 | /// values. |
| 80 | pub fn new() -> Self { |
| 81 | Program { |
| 82 | insts: vec![], |
| 83 | matches: vec![], |
| 84 | captures: vec![], |
| 85 | capture_name_idx: Arc::new(HashMap::new()), |
| 86 | start: 0, |
| 87 | byte_classes: vec![0; 256], |
| 88 | only_utf8: true, |
| 89 | is_bytes: false, |
| 90 | is_dfa: false, |
| 91 | is_reverse: false, |
| 92 | is_anchored_start: false, |
| 93 | is_anchored_end: false, |
| 94 | has_unicode_word_boundary: false, |
| 95 | prefixes: LiteralSearcher::empty(), |
| 96 | dfa_size_limit: 2 * (1<<20), |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | /// If pc is an index to a no-op instruction (like Save), then return the |
| 101 | /// next pc that is not a no-op instruction. |