Build a translator using the current configuration.
(&self)
| 45 | |
| 46 | /// Build a translator using the current configuration. |
| 47 | pub fn build(&self) -> Translator { |
| 48 | Translator { |
| 49 | stack: RefCell::new(vec![]), |
| 50 | flags: Cell::new(self.flags), |
| 51 | allow_invalid_utf8: self.allow_invalid_utf8, |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /// When enabled, translation will permit the construction of a regular |
| 56 | /// expression that may match invalid UTF-8. |