Build a parser from this configuration with the given pattern.
(&self)
| 142 | |
| 143 | /// Build a parser from this configuration with the given pattern. |
| 144 | pub fn build(&self) -> Parser { |
| 145 | Parser { |
| 146 | pos: Cell::new(Position { offset: 0, line: 1, column: 1 }), |
| 147 | capture_index: Cell::new(0), |
| 148 | nest_limit: self.nest_limit, |
| 149 | octal: self.octal, |
| 150 | initial_ignore_whitespace: self.ignore_whitespace, |
| 151 | ignore_whitespace: Cell::new(self.ignore_whitespace), |
| 152 | comments: RefCell::new(vec![]), |
| 153 | stack_group: RefCell::new(vec![]), |
| 154 | stack_class: RefCell::new(vec![]), |
| 155 | capture_names: RefCell::new(vec![]), |
| 156 | scratch: RefCell::new(String::new()), |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | /// Set the nesting limit for this parser. |
| 161 | /// |
no outgoing calls
no test coverage detected