Interned keyword name behind a Val, or None when not a string.
(&self, k: Val)
| 9 | |
| 10 | // Interned keyword name behind a Val, or None when not a string. |
| 11 | pub(crate) fn kw_name(&self, k: Val) -> Option<&str> { |
| 12 | match self.heap.try_get(k) { |
| 13 | Some(HeapObj::Str(s)) => Some(s.as_str()), |
| 14 | _ => None, |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | /* Byte offset of the last propagating error, or None on success / before `run()`. */ |
| 19 | pub fn error_pos(&self) -> Option<usize> { self.error_byte_pos.map(|p| p as usize) } |
no test coverage detected