Define an entity. This can be used for instructions whose numbers never appear in source, or implicitly defined signatures.
(&mut self, entity: AnyEntity, loc: Location)
| 192 | /// Define an entity. This can be used for instructions whose numbers never |
| 193 | /// appear in source, or implicitly defined signatures. |
| 194 | pub fn def_entity(&mut self, entity: AnyEntity, loc: Location) -> ParseResult<()> { |
| 195 | if self.locations.insert(entity, loc).is_some() { |
| 196 | err!(loc, "duplicate entity: {}", entity) |
| 197 | } else { |
| 198 | Ok(()) |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | #[cfg(test)] |
no test coverage detected